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

            Bug ID: 33599
           Summary: readelf -Ds doesn't displace the base version
           Product: binutils
           Version: 2.46 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---

[hjl@gnu-tgl-3 readelf]$ cat x.s
        .globl foo_base
        .data
foo_base:
        .dc.a bar

        .globl foo
foo:
        .dc.a bar

        .symver foo_base,foo@
[hjl@gnu-tgl-3 readelf]$ cat x.map
VERS_1 {
  global:
    foo;
  local:
    *;
};
[hjl@gnu-tgl-3 readelf]$ make
as   -o x.o x.s
ld -shared --version-script x.map -o x.so x.o
./readelf -DsW x.so

Symbol table for image contains 5 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND bar
     2: 0000000000003008     0 NOTYPE  GLOBAL DEFAULT   10 foo@@VERS_1
     3: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  ABS VERS_1
     4: 0000000000003000     0 NOTYPE  GLOBAL DEFAULT   10 foo
objdump -T x.so

x.so:     file format elf64-x86-64

DYNAMIC SYMBOL TABLE:
0000000000000000      D  *UND*  0000000000000000              bar
0000000000003008 g    D  .data  0000000000000000  VERS_1      foo
0000000000000000 g    DO *ABS*  0000000000000000  VERS_1      VERS_1
0000000000003000 g    D  .data  0000000000000000 (Base)       foo


[hjl@gnu-tgl-3 readelf]$ 

"readelf -Ds" should report the base version for

     4: 0000000000003000     0 NOTYPE  GLOBAL DEFAULT   10 foo

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to