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

            Bug ID: 28928
           Summary: Wrong dynamic section entry number
           Product: elfutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tools
          Assignee: unassigned at sourceware dot org
          Reporter: dichen at redhat dot com
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

when using `$ eu-readelf -d {file}` to get the number of dynamic section
entris,
It wrongly counts the padding DT_NULLs as dynamic section entries.
However, DT_NULL Marks end of dynamic section. They should not be counted as
dynamic section entries.

```
$ eu-readelf -d /usr/local/bin/eu-readelf 

Dynamic segment contains 31 entries:
 Addr: 0x0000000000474e00  Offset: 0x073e00  Link to section: [ 7] '.dynstr'
  Type              Value
  NEEDED            Shared library: [libdw.so.1]
  NEEDED            Shared library: [libelf.so.1]
  NEEDED            Shared library: [libc.so.6]
  INIT              0x0000000000404000
  FINI              0x000000000043d4a8
  INIT_ARRAY        0x0000000000474df0
  INIT_ARRAYSZ      8 (bytes)
  FINI_ARRAY        0x0000000000474df8
  FINI_ARRAYSZ      8 (bytes)
  GNU_HASH          0x00000000004003a0
  STRTAB            0x00000000004016b0
  SYMTAB            0x00000000004003f0
  STRSZ             3086 (bytes)
  SYMENT            24 (bytes)
  DEBUG             
  PLTGOT            0x0000000000475000
  PLTRELSZ          4560 (bytes)
  PLTREL            RELA
  JMPREL            0x00000000004026a0
  RELA              0x0000000000402610
  RELASZ            144 (bytes)
  RELAENT           24 (bytes)
  VERNEED           0x0000000000402450
  VERNEEDNUM        3
  VERSYM            0x00000000004022be
  NULL              
  NULL              
  NULL              
  NULL              
  NULL              
  NULL              

```

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

Reply via email to