From: "dichen at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: elfutils-devel@sourceware.org
Subject: [Bug tools/28928] New: Wrong dynamic section entry number
Date: Mon, 28 Feb 2022 13:15:46 +0000 [thread overview]
Message-ID: <bug-28928-10460@http.sourceware.org/bugzilla/> (raw)
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.
next reply other threads:[~2022-02-28 13:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-28 13:15 dichen at redhat dot com [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-28928-10460@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=elfutils-devel@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).