This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: common symbols
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