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)
Thu, Nov 14, 12:19 PM
Unknown Object (File)
Thu, Nov 7, 9:15 AM
Unknown Object (File)
Tue, Nov 5, 9:35 AM
Unknown Object (File)
Sat, Nov 2, 8:50 AM
Unknown Object (File)
Oct 21 2024, 9:33 AM
Unknown Object (File)
Oct 19 2024, 7:46 PM
Unknown Object (File)
Oct 18 2024, 7:22 AM
Unknown Object (File)
Oct 17 2024, 10:47 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.