common symbols
Ian Lance Taylor
iant@google.com
Mon Feb 28 23:34:00 GMT 2011
ali hagigat <hagigatali@gmail.com> writes:
> As far as I understood "common symbol" is defined and it is part of
> the input section named, COMMON. But that depends on assembler. For
> GNU as, it seems that we can not define common symbol!!
A common symbol is distinct from a definition or a reference. It has
nothing to do with an input section named COMMON. The linker script
language does permit you to pretend that all common symbols are in an
input section named COMMON, but that is just a convenience for the
linker script language.
In GNU as you can define a common symbol using the .comm pseudo-op, as
documented in the assembler manual.
Please consider doing more research before asking your questions.
Thanks.
Ian
More information about the Binutils
mailing list