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)
Fri, Dec 6, 5:39 PM
Unknown Object (File)
Mon, Dec 2, 1:58 AM
Unknown Object (File)
Nov 23 2024, 10:23 PM
Unknown Object (File)
Nov 23 2024, 8:37 AM
Unknown Object (File)
Nov 14 2024, 12:19 PM
Unknown Object (File)
Nov 7 2024, 9:15 AM
Unknown Object (File)
Nov 5 2024, 9:35 AM
Unknown Object (File)
Nov 2 2024, 8:50 AM
Subscribers

Details

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

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.