Page MenuHomeFreeBSD

Disconnect objdump from the build
ClosedPublic

Authored by emaste on Jul 27 2016, 6:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 29, 8:18 AM
Unknown Object (File)
Thu, Nov 28, 10:11 PM
Unknown Object (File)
Sun, Nov 24, 7:42 PM
Unknown Object (File)
Sun, Nov 24, 10:16 AM
Unknown Object (File)
Sun, Nov 24, 12:51 AM
Unknown Object (File)
Sat, Nov 23, 12:51 PM
Unknown Object (File)
Sat, Nov 23, 9:59 AM
Unknown Object (File)
Fri, Nov 22, 12:25 AM

Details

Summary

The in-tree binutils is old and will not be updated. Other tools are migrating to copyfree alternatives but there is not yet a direct replacement for objdump. Just remove it as it is not used by the build, and updated and maintained versions are available from ports and packages.

Note: Will not be committed prior to 11.0 being released.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

emaste retitled this revision from to Disconnect objdump from the build.
emaste updated this object.
emaste edited the test plan for this revision. (Show Details)
emaste added subscribers: brooks, bdrewery, imp, jhb.

ObsoleteFiles.inc to be updated as well prior to commit. Not done yet as conflicts would be encountered on each rebase.

Note that llvm-objdump is starting to gain features currently missing compared to GNU objdump -- most importantly, -S (mixed source and disassembly) was recently added.

Note there is a consumer in ports Mk/bsd/port.mk:

security-check: ${TMPPLIST}
# Scan PLIST for:
...
#   2.  accept()/recvfrom() which indicates network listening capability
#   3.  insecure functions (gets/mktemp/tempnam/[XXX])
#   4.  startup scripts, in conjunction with 2.                                 
...
    | ${XARGS} -0 -n 1 ${OBJDUMP} -R 2> /dev/null > ${WRKDIR}/.PLIST.objdump; \ 
...

We can use readelf -r as a replacement for objdump -R, although readelf -Ws | sed -En 's/^.* UND ([^@]+).*$/\1/p' might be more suitable.

There are also instances of ${OBJDUMP} in the Makefiles for graphics/OpenEXR (see D7842), devel/aros-sdk, devel/abi-compliance-checker, dns/dnsmasq, dns/dnsmasq-devel. The two dnsmask uses can be addressed with a change equivalent to D7842; the other two ports need more investigation.

D7881 for dns/dnsmasq and dns/dnsmasq-devel

Rebase after rS306649, add to ObsoleteFiles.inc

I really like this tool but you're right, we can just use the package.

It will break the ports security-check thing which runs at 'make install' time. See OBJDUMP usage in /usr/ports/Mk/bsd.port.mk in security-check target and uses Mk/Scripts/security-check.awk for parsing. It looks like it is pretty trivial to convert to readelf format.

Is llvm-objdump far enough along to implement the functionality needed by ports?

For the ports infrastructure security-check thing we should just switch to readelf instead.

A ports exp-run w/o objdump is in PR 212319. Failures were a bunch of gcc packages:

  • devel/aarch64-none-elf-gcc
  • devel/amd64-gcc
  • devel/arm-none-eabi-gcc
  • devel/arm-none-eabi-gcc492
  • devel/avr-gcc
  • devel/avr-gcc-devel
  • devel/gcc-arm-embedded
  • devel/gcc-msp430-ti-toolchain
  • devel/mingw32-gcc
  • devel/mips-gcc
  • devel/mips64-gcc
  • devel/powerpc64-gcc
  • devel/psptoolchain-gcc-stage1
  • devel/sparc64-gcc

and x11-fm/gnome-commander2

Also graphics/OpenEXR and lang/fsharp on i386.

Rebase and add WITH_BINUTILS and WITHOUT_BINUTILS updates

Plan to migrate to llvm-objdump instead, in D18307

emaste added a subscriber: kib.

In D18307 @kib suggests not installing as objdump; leave both reviews open until we decide.

This revision was not accepted when it landed; it landed in state Needs Review.May 6 2020, 6:38 PM
This revision was automatically updated to reflect the committed changes.