bug-binutils
[Top][All Lists]
Advanced

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

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


From: rafael.espindola at gmail dot com
Subject: [Bug gold/17498] New: gold includes far more symbols in symtab than bfd ld
Date: Mon, 20 Oct 2014 20:24:21 +0000

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

            Bug ID: 17498
           Summary: gold includes far more symbols in symtab than bfd ld
           Product: binutils
           Version: 2.26 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
          Assignee: ccoutant at google dot com
          Reporter: rafael.espindola at gmail dot com
                CC: ian at airs dot com

Linking clang with gold produces a binary with 185552 symbols in .symtab. With
gnu ld, only 60018.

The result is that when using --strip-all both linkers produce binaries of
comparable sizes, but without it the one produced by gold is 4.3 MB bigger.

The entire difference seems to come from bfd hiding .L symbols:

$ 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

-- 
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]