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

--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> ---
I can't reproduce it on Linux with cross binutils configured for
x86_64-pc-solaris2:

[hjl@gnu-tgl-3 pr33684]$ make
./ld -G -m elf_x86_64_sol2 -o foo.so hello.o
./objcopy foo.so copy.so
readelf -sW foo.so > foo.sym
readelf -sW copy.so > copy.sym
[hjl@gnu-tgl-3 pr33684]$ diff -up foo.sym copy.sym
[hjl@gnu-tgl-3 pr33684]$ cat foo.sym

Symbol table '.dynsym' contains 7 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND printf
     2: 0000000000100320     0 OBJECT  GLOBAL DEFAULT   10 _DYNAMIC
     3: 0000000000000240     0 OBJECT  GLOBAL DEFAULT    6
_PROCEDURE_LINKAGE_TABLE_
     4: 0000000000000260    69 FUNC    GLOBAL DEFAULT    7 main
     5: 0000000000100448     0 OBJECT  GLOBAL DEFAULT   12
_GLOBAL_OFFSET_TABLE_
     6: 0000000000100468     4 OBJECT  GLOBAL DEFAULT   13 l_argc

Symbol table '.symtab' contains 11 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS hello.c
     2: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS 
     3: 0000000000100470     0 OBJECT  LOCAL  DEFAULT   13 _END_
     4: 0000000000000260     0 OBJECT  LOCAL  DEFAULT    7 _START_
     5: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND printf
     6: 0000000000100320     0 OBJECT  GLOBAL DEFAULT   10 _DYNAMIC
     7: 0000000000000240     0 OBJECT  GLOBAL DEFAULT    6
_PROCEDURE_LINKAGE_TABLE_
     8: 0000000000000260    69 FUNC    GLOBAL DEFAULT    7 main
     9: 0000000000100448     0 OBJECT  GLOBAL DEFAULT   12
_GLOBAL_OFFSET_TABLE_
    10: 0000000000100468     4 OBJECT  GLOBAL DEFAULT   13 l_argc
[hjl@gnu-tgl-3 pr33684]$

I didn't see section symbols with ld from binutils master branch:

commit 894024c708c3bdbd75855c4eecc12db583762e83
Author: Alan Modra <[email protected]>
Date:   Tue Dec 2 10:28:04 2025 +1030

    mips regression fixes

since there is

#define elf_backend_omit_section_dynsym \
  _bfd_elf_omit_section_dynsym_all

in elfxx-x86.h.

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

Reply via email to