This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

nm dying on stripped .so's

I’ve got a valid .so that I’m trying to dump symbols of, but nm doesn’t like the fact that the section header size is zero… Or that’s what I’ve been able to ascertain, perhaps incorrectly.

This is what I see:

$ nm -D usr/lib/php/
nm: usr/lib/php/ no symbols

yet the file is otherwise fine:

$ readelf -e usr/lib/php/
ELF Header:
  Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF64
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              DYN (Shared object file)
  Machine:                           Advanced Micro Devices X86-64
  Version:                           0x1
  Entry point address:               0x252d
  Start of program headers:          64 (bytes into file)
  Start of section headers:          0 (bytes into file)
  Flags:                             0x0
  Size of this header:               64 (bytes)
  Size of program headers:           56 (bytes)
  Number of program headers:         6
  Size of section headers:           0 (bytes)
  Number of section headers:         0
  Section header string table index: 0

There are no sections in this file.

Program Headers:
  Type           Offset             VirtAddr           PhysAddr
                 FileSiz            MemSiz              Flags  Align
  LOAD           0x0000000000000000 0x0000000000000000 0x0000000000000000
                 0x0000000000005654 0x0000000000005654  R E    200000
  LOAD           0x0000000000005e40 0x0000000000205e40 0x0000000000205e40
                 0x0000000000001282 0x0000000000001300  RW     200000
  DYNAMIC        0x0000000000006c40 0x0000000000206c40 0x0000000000206c40
                 0x00000000000001a0 0x00000000000001a0  RW     8
  GNU_EH_FRAME   0x0000000000004d60 0x0000000000004d60 0x0000000000004d60
                 0x0000000000000144 0x0000000000000144  R      4
  GNU_STACK      0x0000000000000000 0x0000000000000000 0x0000000000000000
                 0x0000000000000000 0x0000000000000000  RW     10
  GNU_RELRO      0x0000000000005e40 0x0000000000205e40 0x0000000000205e40
                 0x00000000000011c0 0x00000000000011c0  R      1

Is there a patch to allow it to not choke on a stripped .so?



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]