bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/17498] gold includes far more symbols in symtab than bfd ld


From: ccoutant at gmail dot com
Subject: [Bug gold/17498] gold includes far more symbols in symtab than bfd ld
Date: Thu, 04 Jun 2015 23:14:10 +0000

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]