Bug 1396092

Summary: elfutils: Please implement eu-readelf --symbols[=SECTION]
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: elfutilsAssignee: Mark Wielaard <mjw>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: aoliva, fche, jakub, me, mjw, mjw, roland
Target Milestone: ---Keywords: FutureFeature, Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: elfutils-0.168-1.fc25 elfutils-0.168-1.fc24 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-11 12:19:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Florian Weimer 2016-11-17 12:22:45 UTC
binutils readelf supports the -D flag, which restricts symbol output to the .dynsym section.  For my interests, .dynsym is much more important than .symtab, and having both in the output confuses me from time to time.

Comment 1 Mark Wielaard 2016-11-17 13:03:15 UTC
This seems a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=444621
Although the summary doesn't immediately makes that clear.

Comment 2 Florian Weimer 2016-11-17 13:27:44 UTC
Oh.  It wasn't clear that “readelf -D” doesn't list .dynsym, but something else entirely.

Comment 3 Mark Wielaard 2016-11-17 13:42:45 UTC
(In reply to Florian Weimer from comment #2)
> Oh.  It wasn't clear that “readelf -D” doesn't list .dynsym, but something
> else entirely.

It does list it. Because .dynsym is (by convention) the allocated section that DT_SYMTAB points to.

But maybe what you want is something like --symbols[=SECTION]? Which, if SECTION is provided, would only print the symbol table for the named section instead of all of them (just like --strings[=SECTION]).

Comment 4 Florian Weimer 2016-11-17 13:47:56 UTC
(In reply to Mark Wielaard from comment #3)
> (In reply to Florian Weimer from comment #2)
> > Oh.  It wasn't clear that “readelf -D” doesn't list .dynsym, but something
> > else entirely.
> 
> It does list it. Because .dynsym is (by convention) the allocated section
> that DT_SYMTAB points to.

It's not sorted by symbol index, which makes some use cases more difficult.  For others, it does not matter.

> But maybe what you want is something like --symbols[=SECTION]? Which, if
> SECTION is provided, would only print the symbol table for the named section
> instead of all of them (just like --strings[=SECTION]).

Oh, that would be helpful, yes.

Comment 5 Mark Wielaard 2016-11-17 14:26:02 UTC
(In reply to Florian Weimer from comment #4)
> (In reply to Mark Wielaard from comment #3)
> > But maybe what you want is something like --symbols[=SECTION]? Which, if
> > SECTION is provided, would only print the symbol table for the named section
> > instead of all of them (just like --strings[=SECTION]).
> 
> Oh, that would be helpful, yes.

https://lists.fedorahosted.org/archives/list/elfutils-devel@lists.fedorahosted.org/message/T4E2CTA6MNY2EAS6V42WXJV5OQIGKFLQ/

Comment 6 Fedora Update System 2016-12-28 19:23:03 UTC
elfutils-0.168-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-0cdc2d3b14

Comment 7 Fedora Update System 2016-12-29 09:21:00 UTC
elfutils-0.168-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-0cdc2d3b14

Comment 8 Fedora Update System 2016-12-31 22:20:21 UTC
elfutils-0.168-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2017-01-01 13:37:26 UTC
elfutils-0.168-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-6c9a495a48

Comment 10 Fedora Update System 2017-01-02 01:50:47 UTC
elfutils-0.168-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-6c9a495a48

Comment 11 Fedora Update System 2017-01-11 12:19:10 UTC
elfutils-0.168-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.