bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/28158] New: nm --dynamic and readelf --dyn-syms vs. copy r


From: amodra at gmail dot com
Subject: [Bug binutils/28158] New: nm --dynamic and readelf --dyn-syms vs. copy reloc symbols
Date: Sun, 01 Aug 2021 02:12:16 +0000

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

            Bug ID: 28158
           Summary: nm --dynamic and readelf --dyn-syms vs. copy reloc
                    symbols
           Product: binutils
           Version: 2.38 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: amodra at gmail dot com
  Target Milestone: ---

The following testcase gives readelf --dyn-syms output on x86_64-linux of

Symbol table '.dynsym' contains 2 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 0000000000403000     8 NOTYPE  GLOBAL DEFAULT   13 foo@VER (2)

vs. nm --dynamic output of

0000000000403000 B foo@@VER

Notice the disagreement in number of '@'s shown.

cat > prxxxxxa.s <<\EOF
 .text
 .dc.a foo
EOF
cat > prxxxxxb.s <<\EOF
 .data
 .globl foo
foo: .dc.a foo
 .size foo, .-foo
EOF
cat > prxxxxx.ver <<\EOF
VER { global: foo; local: *; };
EOF
gas/as-new -o prxxxxxa.o prxxxxxa.s
gas/as-new -o prxxxxxb.o prxxxxxb.s
ld/ld-new -shared -o prxxxxx.so prxxxxxb.o --version-script prxxxxx.ver 
ld/ld-new -o prxxxxx prxxxxxa.o prxxxxx.so
binutils/readelf --dyn-syms prxxxxx
binutils/nm-new --dynamic prxxxxx

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