Page MenuHomeFreeBSD

As objdump is being phased out for 12.0, convert the small bit using it to using readelf.
ClosedPublic

Authored by mat on Jun 19 2018, 2:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 10, 1:17 AM
Unknown Object (File)
Jan 18 2024, 12:07 AM
Unknown Object (File)
Dec 20 2023, 1:00 AM
Unknown Object (File)
Dec 13 2023, 4:28 PM
Unknown Object (File)
Dec 10 2023, 2:06 AM
Unknown Object (File)
Nov 11 2023, 5:04 PM
Unknown Object (File)
Nov 9 2023, 5:03 PM
Unknown Object (File)
Oct 29 2023, 1:08 AM
Subscribers

Details

Reviewers
emaste
Group Reviewers
portmgr
Commits
rP473605: Convert to readelf.

Diff Detail

Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 17480
Build 17309: arc lint + arc unit

Event Timeline

Reported in the PR -- nm might be more useful for this script.

I can also add --print-file-name to readelf though to make it always emit the File: line.

Mmmm,

$ readelf --print-file-name -r /usr/bin/mktemp
readelf: unrecognized option `--print-file-name'
In D15904#336884, @mat wrote:

Mmmm,

$ readelf --print-file-name -r /usr/bin/mktemp
readelf: unrecognized option `--print-file-name'

The option for readelf doesn't exist in HEAD yet, it's in review in D15908.

This looks fine to me. It's probably worth adding a comment explaining the use of ${NONEXISTENT} though.

In D15904#336884, @mat wrote:

Mmmm,

$ readelf --print-file-name -r /usr/bin/mktemp
readelf: unrecognized option `--print-file-name'

The option for readelf doesn't exist in HEAD yet, it's in review in D15908.

Ah, that is why, and this was on 10.4, so a bit far from HEAD :-)

This looks fine to me. It's probably worth adding a comment explaining the use of ${NONEXISTENT} though.

Yes, I have it in my local repository.

Another option: upon discussion with @dim we will likely end up installing llvm's llvm-objdump as objdump. It's broadly compatible, but the output format etc. might be slightly different.

Migrating to readelf is probably still the best option here though.

As the task is simple, the tool we actually end up using does not really matter.

What matters is that it is available on all supported releases :-)

  • Add a note about the ${NONEXISTENT} argument.
In D15904#336964, @mat wrote:

What matters is that it is available on all supported releases :-)

Indeed, and readelf will always be available.

This revision was not accepted when it landed; it landed in state Needs Review.Jun 30 2018, 8:37 AM
Closed by commit rP473605: Convert to readelf. (authored by mat). · Explain Why
This revision was automatically updated to reflect the committed changes.