Bug 1455687 - Multiple .shstrtab sections since eu-readelf 0.166
Summary: Multiple .shstrtab sections since eu-readelf 0.166
Alias: None
Product: Red Hat Developer Toolset
Classification: Red Hat
Component: elfutils
Version: DTS 6.1 RHEL 6
Hardware: All
OS: Linux
Target Milestone: alpha
: 7.0
Assignee: Mark Wielaard
QA Contact: Martin Cermak
Depends On:
TreeView+ depends on / blocked
Reported: 2017-05-25 19:55 UTC by Paulo Andrade
Modified: 2020-12-14 08:45 UTC (History)
6 users (show)

Fixed In Version: devtoolset-7-elfutils-0.169-3.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-10-24 09:46:09 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:3010 0 normal SHIPPED_LIVE new packages: devtoolset-7-elfutils 2017-10-24 13:20:15 UTC
Sourceware 21525 0 None None None 2017-05-25 19:56:49 UTC

Description Paulo Andrade 2017-05-25 19:55:47 UTC
This issue happens in all Red Hat releases and
Fedora, but reported here, as the issue was reported
for DTS 6.1 on RHEL 6.

I understand this is not really a bug, but it generates an
output more complex than it should be, and confuses tools like


$ cat test.c
int main() { return 1; }

$ gcc -g test.c

$ eu-strip -g a.out

$ eu-readelf -S a.out | grep .shstrtab | wc -l

  The extra section appears useless at least on the
sense of a very simple test case.

  The issue started with this commit:

  patchelf is not a Red Hat package.

Comment 3 Mark Wielaard 2017-05-31 14:47:21 UTC
Replicated. There are indeed two .shstrtab sections. Only the second is used (and it is what ELF section header string table points at). The first is the old unused copy from the original file with the old section names in it. This is indeed unfortunate for tools selecting sections by name. It isn't guaranteed that two sections cannot have the same name. But tools might still make that assumption.

Comment 4 Mark Wielaard 2017-06-07 18:50:02 UTC
Posted an upstream fix:

Comment 6 Martin Cermak 2017-09-15 14:19:34 UTC
Replicated using elfutils-0.168-8.el7, verified using devtoolset-7-elfutils-0.170-1.el{6,7} both using the initial reproducer and using provided/packaged run-strip-test.sh.

Comment 8 errata-xmlrpc 2017-10-24 09:46:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.