This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: common symbols and GNU ld
- From: Andreas Schwab <schwab at redhat dot com>
- To: ali hagigat <hagigatali at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 11 May 2011 13:06:38 +0200
- Subject: Re: common symbols and GNU ld
- References: <BANLkTi=ivd34x472-Ba+-FQEKFY3f7yaYw@mail.gmail.com>
ali hagigat <hagigatali@gmail.com> writes:
> "FORCE_COMMON_ALLOCATION" of ld seems not working!
As documented, this statement has no effect except for relocatable
linking.
> SYMBOL TABLE:
> 00000000 l d .text 00000000 .text
> 00000010 l d .bss 00000000 .bss
> 00000000 l .text 00000000 aval
> 00000004 l .text 00000000 aval
> 00000010 g O .bss 0000000a dovom
>
> Why two different spaces are not considered for "dovom"?
What do you mean with "spaces are not considered"? Both objects
allocate 10 bytes for the common symbol dovom, and the linker has
allocated a single 10 byte space for them, as expected.
Andreas.
--
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E
"And now for something completely different."