public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: "dichen at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: elfutils-devel@sourceware.org
Subject: [Bug tools/28873] Implement eu-readelf -D
Date: Mon, 16 Jan 2023 13:39:37 +0000	[thread overview]
Message-ID: <bug-28873-10460-WVApoCZRtX@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28873-10460@http.sourceware.org/bugzilla/>

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

--- Comment #6 from Di Chen <dichen at redhat dot com> ---
[Follow the last comment]

For a binary with SYMTAB STRTAB having different order, like upside down, or
having other section in between. eg.

```
$ readelf -Dd /usr/local/go/bin/go

Dynamic section at offset 0x9e5220 contains 19 entries:
  Tag        Type                         Name/Value
 0x0000000000000004 (HASH)               0xb3c3c0
 0x0000000000000006 (SYMTAB)             0xb3c880
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000005 (STRTAB)             0xb3c660
 0x000000000000000a (STRSZ)              531 (bytes)
 0x0000000000000007 (RELA)               0xb3bfd8
 0x0000000000000008 (RELASZ)             24 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x0000000000000003 (PLTGOT)             0xde5100
 0x0000000000000015 (DEBUG)              0x0
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000006ffffffe (VERNEED)            0xb3c360
 0x000000006fffffff (VERNEEDNUM)         2
 0x000000006ffffff0 (VERSYM)             0xb3c300
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000002 (PLTRELSZ)           768 (bytes)
 0x0000000000000017 (JMPREL)             0xb3bff0
 0x0000000000000000 (NULL)               0x0

```

It will mess up the syments (symbol table entry number) calculation.

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

  parent reply	other threads:[~2023-01-16 13:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-08 14:41 [Bug tools/28873] New: " dichen at redhat dot com
2022-02-08 14:43 ` [Bug tools/28873] " dichen at redhat dot com
2022-02-08 14:43 ` dichen at redhat dot com
2022-03-30 11:48 ` dichen at redhat dot com
2022-03-31 13:07 ` dichen at redhat dot com
2022-04-19  8:18 ` mark at klomp dot org
2022-08-08  9:33 ` dichen at redhat dot com
2022-08-08  9:38 ` dichen at redhat dot com
2022-08-08  9:42 ` dichen at redhat dot com
2023-01-16 13:30 ` dichen at redhat dot com
2023-01-16 13:39 ` dichen at redhat dot com [this message]
2023-02-03 18:24 ` amerey at redhat dot com
2023-02-04 17:02 ` mark at klomp dot org
2023-04-18 19:51 ` 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-28873-10460-WVApoCZRtX@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).