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)
Feb 2 2024, 12:03 AM
Unknown Object (File)
Jan 14 2024, 11:08 AM
Unknown Object (File)
Dec 28 2023, 4:59 AM
Unknown Object (File)
Dec 28 2023, 4:58 AM
Unknown Object (File)
Dec 20 2023, 2:29 AM
Unknown Object (File)
Nov 4 2023, 11:35 PM
Unknown Object (File)
Sep 2 2023, 12:16 PM
Unknown Object (File)
Jul 22 2023, 5:17 PM
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.