https://sourceware.org/bugzilla/show_bug.cgi?id=17498
--- Comment #7 from Cary Coutant <ccoutant at gmail dot com> --- > $ cat test.cpp > void g(const char* x); > void f() { > g("aoeuaoeuaoeuao"); > } > $ gcc -shared -fPIC test.cpp -o test.so -fuse-ld=bfd -O2 && nm test.so | > grep ' r ' > 0000000000000728 r __FRAME_END__ > $ gcc -shared -fPIC test.cpp -o test.so -fuse-ld=gold -O2 && nm test.so | > grep ' r ' > 0000000000000760 r __FRAME_END__ > 00000000000006f5 r .LC0 > > note the extra .LC0 with gold. Ah, gas doesn't discard that local because it's in a merge section. > > I'm not sure what you're asking for here, though. You want to make -X the > > default? > > Yes, just have the some default for --discard-locals/-X as bfd ld. Actually, Gnu ld's default is not -X. By default, it only discards local symbols that are in merge sections (i.e., the only temporary locals that gas doesn't discard). To match Gnu ld, I'll need to add that behavior as the new default, and add a --discard-none option. -- 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