public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [Bug tools/28928] New: Wrong dynamic section entry number
@ 2022-02-28 13:15 dichen at redhat dot com
  2022-02-28 13:19 ` [Bug tools/28928] " dichen at redhat dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: dichen at redhat dot com @ 2022-02-28 13:15 UTC (permalink / raw)
  To: elfutils-devel

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-04-19  8:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-28 13:15 [Bug tools/28928] New: Wrong dynamic section entry number dichen at redhat dot com
2022-02-28 13:19 ` [Bug tools/28928] " dichen at redhat dot com
2022-03-30 11:42 ` dichen at redhat dot com
2022-03-30 11:48 ` dichen at redhat dot com
2022-04-15 15:22 ` mark at klomp dot org
2022-04-15 15:46 ` dichen at redhat dot com
2022-04-19  8:18 ` mark at klomp dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).