This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Controlling the order of variables in the COMMON section
- From: Ian Lance Taylor <iant at google dot com>
- To: Chris Z <cziom2523 at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 06 Apr 2011 17:06:05 -0700
- Subject: Re: Controlling the order of variables in the COMMON section
- References: <31338065.post@talk.nabble.com>
Chris Z <cziom2523@gmail.com> writes:
> So how do I group non initialized global variables in GCC so that they come
> out in the proper order?
If you are using the GNU linker, use the --sort-common linker option.
When using gcc to link, use -Wl,--sort-common.
Ian