Page MenuHomeFreeBSD

readelf(1) -S: Include zero index and match binutils' no-name
ClosedPublic

Authored by cem on Dec 4 2016, 2:39 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 4, 6:55 AM
Unknown Object (File)
Thu, Nov 28, 9:40 PM
Unknown Object (File)
Nov 16 2024, 9:18 PM
Unknown Object (File)
Nov 7 2024, 9:57 PM
Unknown Object (File)
Oct 18 2024, 1:17 AM
Unknown Object (File)
Oct 18 2024, 1:17 AM
Unknown Object (File)
Oct 18 2024, 1:17 AM
Unknown Object (File)
Oct 18 2024, 12:47 AM
Subscribers
None

Details

Summary

Include the SHN_UNDEF (zero) index special section in extended-attribute
ELF files, like GNU binutils' readelf.

Additionally, print "<no-name>" for sections without names, like GNU
binutils.

Test Plan

This is the last change needed to elftoolchain to match binutils behavior for
the coredump_phnum test case.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

cem retitled this revision from to readelf(1) -S: Include zero index and match binutils' no-name.
cem updated this object.
cem edited the test plan for this revision. (Show Details)
cem added a reviewer: emaste.
contrib/elftoolchain/readelf/readelf.c
6560 ↗(On Diff #22696)

For parity with binutils.

6566 ↗(On Diff #22696)

(Only skip sections if there was actually an error — it's valid for ELF files to have a SHN_UNDEX index section.)

kaiw edited edge metadata.

Patch looks good to me!

This revision is now accepted and ready to land.Dec 7 2016, 5:41 PM
This revision was automatically updated to reflect the committed changes.