https://sourceware.org/bugzilla/show_bug.cgi?id=17615

--- Comment #11 from dimitry <dimitry at google dot com> ---
(In reply to H.J. Lu from comment #10)
> Use "ld --gc-sections -shared" directly.  You will see there is no
> .bss section at all.  The .bss section you see comes from other
> input files added by GCC driver.

I am using 2.c and the command from comment #8 to compile lib2.so; my
assumption is: if .bss section is coming from other source files it should not
change it's size if I initialize one of global ints to some non-zero value; but
if I do .bss section size drops from 8 to 4 bytes as expected and data section
increases by 4 bytes. So it looks like .bss section is allocated for the global
variables declared in 2.c. Am I missing something else here?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to