On Fedora/12 where gnu-hash is used, I got

[...@gnu-6 pr]$ cat foo.c
#include <stdio.h>

int
main ()
{
  printf ("Hello\n");
  return;
}
[...@gnu-6 pr]$ gcc foo.c
[...@gnu-6 pr]$ readelf -Ds a.out
[...@gnu-6 pr]$ readelf -s a.out

Symbol table '.dynsym' contains 4 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
     2: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND p...@glibc_2.2.5 (2)
     3: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND
__libc_start_m...@glibc_2.2.5 (2)
...

"readelf -Ds" uses hash section to find dynamic symbols.  Since
gnu-hash doesn't include local nor undefined dynamic symbols,
those dynamic symbols aren't displayed.

-- 
           Summary: "readelf -Ds" doesn't work right
           Product: binutils
           Version: 2.21 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: hjl dot tools at gmail dot com
                CC: bug-binutils at gnu dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=11146

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

Reply via email to