common symbols and GNU ld

Andreas Schwab schwab@redhat.com
Wed May 11 11:06:00 GMT 2011


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."



More information about the Binutils mailing list