Controlling the order of variables in the COMMON section

Ian Lance Taylor iant@google.com
Thu Apr 7 00:06:00 GMT 2011


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



More information about the Gcc-help mailing list