An ongoing project in FreeBSD is the migration to modern, permissively licensed components for the tool chain, which includes moving away from the obsolete binutils components still in the base system. This PR tracks outstanding issues in removing GNU objdump 2.17.50 from the base system.
A commit references this bug: Author: emaste Date: Fri Jun 15 16:14:42 UTC 2018 New revision: 335209 URL: https://svnweb.freebsd.org/changeset/base/335209 Log: elf.5: add readelf cross-reference objdump is sometimes used in cases where readelf is more appropriate, but the obsolete GNU objdump we have in the base system will be removed in the future. .Xr readelf from elf.5 to improve the odds the more appropriate tool will be found. PR: 229046 MFC after: 1 week Sponsored by: The FreeBSD Foundation Changes: head/share/man/man5/elf.5
A commit references this bug: Author: emaste Date: Fri Jun 15 16:18:40 UTC 2018 New revision: 335210 URL: https://svnweb.freebsd.org/changeset/base/335210 Log: Remove objcopy from BINUTILS option descriptions As of r306649 objcopy is always ELF Tool Chain's elfcopy; binutils objcopy is never used. PR: 229046 MFC after: 1 week Sponsored by: The FreeBSD Foundation Changes: head/tools/build/options/WITHOUT_BINUTILS head/tools/build/options/WITHOUT_BINUTILS_BOOTSTRAP head/tools/build/options/WITH_BINUTILS head/tools/build/options/WITH_BINUTILS_BOOTSTRAP
release/picobsd/build/picobsd used to find lib depends i="`objdump -x ${tmp} | \ awk '$1 == "NEEDED" { print $2 }' | sort | uniq | tr '\n' ' '`" share/man/man5/elf.5 .Xr objdump 1 , sys/conf/kern.pre.mk seems to be a objcopy typo # Architecture and output format arguments for objdump to convert image to # object file tools/debugscripts/kld_deb.py j = popen2.popen4('objdump --section-headers "%s" | grep "\.text"' % p)[0].read().strip().split() tools/tools/shlib-compat/shlib-compat.py usr.bin/ldd/sods.c if (IS_ELF(*(const Elf32_Ehdr*) align_struct(file_base))) { warnx("%s: this is an ELF program; use objdump to examine", fname); usr.sbin/asf/asf.c snprintf(ocbuf, sizeof(ocbuf), "/usr/bin/objdump --section-headers %s", path); usr.sbin/pmcannotate/pmcannotate.8 usr.sbin/pmcannotate/pmcannotate.c
A commit references this bug: Author: emaste Date: Fri Jun 15 16:28:50 UTC 2018 New revision: 335213 URL: https://svnweb.freebsd.org/changeset/base/335213 Log: ldd: reference readelf instead of objdump in warning message We have an obsolete GNU objdump 2.17.50 in the base system, which will be removed in the future. Suggest readelf(1) for examining ELF files instead; for most use cases it is the preferred tool anyhow. PR: 229046 MFC after: 1 week Sponsored by: The FreeBSD Foundation Changes: head/usr.bin/ldd/sods.c
A commit references this bug: Author: emaste Date: Fri Jun 15 16:32:18 UTC 2018 New revision: 335214 URL: https://svnweb.freebsd.org/changeset/base/335214 Log: Correct kern.pre.mk comment: objcopy, not objdump, copies objects. PR: 229046 MFC after: 1 week Sponsored by: The FreeBSD Foundation Changes: head/sys/conf/kern.pre.mk
jmg@, could you update tools/debugscripts/kld_deb.py to use readelf instead of objdump?
gleb@, could you update tools/tools/shlib-compat/shlib-compat.py to use readelf instead of objdump?
jhb@ points out that both kld_deb.py and asf are rendered obsolete by kgdb internally handling FreeBSD kernel module state.
asf removal code review: https://reviews.freebsd.org/D15827
objdump disconnection code review: https://reviews.freebsd.org/D7338 objdump deprecation notice review: https://reviews.freebsd.org/D13881
A commit references this bug: Author: emaste Date: Fri Jun 15 17:03:49 UTC 2018 New revision: 335217 URL: https://svnweb.freebsd.org/changeset/base/335217 Log: Add deprecation notice to objdump man page PR: 229046 MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D13881 Changes: head/contrib/binutils/binutils/doc/binutils.texi
A commit references this bug: Author: emaste Date: Fri Jun 15 17:38:08 UTC 2018 New revision: 335221 URL: https://svnweb.freebsd.org/changeset/base/335221 Log: Add deprecation notice in asf.8 PR: 229046 Reviewed by: jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Changes: head/usr.sbin/asf/asf.8
A commit references this bug: Author: emaste Date: Fri Jun 15 17:44:22 UTC 2018 New revision: 335222 URL: https://svnweb.freebsd.org/changeset/base/335222 Log: Remove obsolete asf(8) kgdb now handles kernel module state internally, so the asf tool serves no purpose. PR: 229046 Reviewed by: brooks Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D15827 Changes: head/ObsoleteFiles.inc head/targets/pseudo/userland/Makefile.depend head/usr.sbin/Makefile.amd64 head/usr.sbin/Makefile.i386 head/usr.sbin/asf/
A commit references this bug: Author: emaste Date: Fri Jun 22 00:27:32 UTC 2018 New revision: 335518 URL: https://svnweb.freebsd.org/changeset/base/335518 Log: MFC r335221: Add deprecation notice in asf.8 PR: 229046 Sponsored by: The FreeBSD Foundation Changes: _U stable/11/ stable/11/usr.sbin/asf/asf.8
A commit references this bug: Author: emaste Date: Fri Jun 22 00:28:28 UTC 2018 New revision: 335519 URL: https://svnweb.freebsd.org/changeset/base/335519 Log: MFC r335214: Correct kern.pre.mk comment: objcopy copies objects. (Not objdump.) PR: 229046 Sponsored by: The FreeBSD Foundation Changes: _U stable/11/ stable/11/sys/conf/kern.pre.mk
A commit references this bug: Author: emaste Date: Fri Jun 22 00:29:29 UTC 2018 New revision: 335520 URL: https://svnweb.freebsd.org/changeset/base/335520 Log: MFC r335209: elf.5: add readelf cross-reference objdump is sometimes used in cases where readelf is more appropriate, but the obsolete GNU objdump we have in the base system will be removed in the future. .Xr readelf from elf.5 to improve the odds the more appropriate tool will be found. PR: 229046 Sponsored by: The FreeBSD Foundation Changes: _U stable/11/ stable/11/share/man/man5/elf.5
A commit references this bug: Author: emaste Date: Fri Jun 22 00:30:25 UTC 2018 New revision: 335521 URL: https://svnweb.freebsd.org/changeset/base/335521 Log: MFC r335213: ldd: reference readelf instead of objdump in warning message We have an obsolete GNU objdump 2.17.50 in the base system, which will be removed in the future. Suggest readelf(1) for examining ELF files instead; for most use cases it is the preferred tool anyhow. PR: 229046 Sponsored by: The FreeBSD Foundation Changes: _U stable/11/ stable/11/usr.bin/ldd/sods.c
See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230288 for an example where sysutils/u-boot-master/Makefile can be made to work for sysutils/u-boot-pine64 with something like: BUILD_DEPENDS+= objdump:devel/binutils to build a correct u-boot-pine64. Based on a WITHOUT_BINUTILS_BOOSTRAP= WITHOUT_BINUTILS= context the build without such a change completed but what was built was wrong.
(In reply to Mark Millard from comment #18) Ignore Comment #18: further testing showed that the problem was intermittent races failing for multi-process builds: MAKE_JOBS_UNSAFE=yes avoids the build problem even without the BUILD_DEPENDS+=objdump:devel/binutils . This was easier to produce on the Pine64+ 2GB environment that I've been using than in the amd64 environment that I've been using.
Proposal to install llvm-objdump as /usr/bin/objdump on Clang-using architectures: https://reviews.freebsd.org/D18307
A commit references this bug: Author: emaste Date: Thu Aug 1 17:02:59 UTC 2019 New revision: 350506 URL: https://svnweb.freebsd.org/changeset/base/350506 Log: remove obsolete kernel debugging script For quite some time kgdb has been internally handling FreeBSD kernel module state; add-on scripts and tools are not needed. asf(8) served a similar purpose to this script and was removed in r335222. PR: 229046 Reported by: jhb Sponsored by: The FreeBSD Foundation Changes: head/tools/debugscripts/kld_deb.py
Dependencies now resolved, and we install llvm-objdump as objdump as of: commit 86edb11e7491e657e6c75ef6814867021665c377 Author: Ed Maste <emaste@FreeBSD.org> Date: Fri Nov 18 15:47:13 2022 -0500 Always install llvm-objdump as objdump Instead of providing no /usr/bin/objdump when LLVM_BINUTILS is false. PR: 267854 [exp-run] Reviewed by: dim MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D37445