This is not exhaustive - DWARF 5 has some new enumeration types not
implemented here - but I think I caught all the ones that are extended
in DWARF 5, plus the new compilation unit type (DW_UT_*), needed when
parsing .debug_info headers.
These were useful when extending libdwarf/ctfconvert/readelf to handle
DWARF generated by gcc 12, which is version 5 by default.
Reviewed by: emaste
MFC after: 3 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38273
This works around brokenness in buildworld's bootstrapping logic: it
uses the source tree's metadata to collect dependency info (such as,
"libdwarf depends on libz") but links against static host libraries.
If these two are out of sync, as is the case if one builds a commit
prior to the introduction of the libz dependency, then the build fails
when trying to statically link nm(1).
Mitigate the problem by defining a weak uncompress() symbol which simply
returns an error. This ensures that the build won't fail when
statically linking libdwarf without zlib. The downside is that any
tools using libdwarf without zlib will now hit a runtime error if they
attempt to decode compressed sections, but at least they'll fail
deterministically, and compressed debug info is only enabled by default
in main.
In particular, this fixes building of branches lacking commit
dbf05458e3, such as releng branches, stable/12 and 13 and old
revisions of main. Previously the nm(1) build would fail with:
ld: error: undefined symbol: uncompress
>>> referenced by libdwarf_elf_init.c:233
>>> (/usr/src/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c:233)
>>> libdwarf_elf_init.o:(_dwarf_elf_init) in archive
>>> /usr/lib/libdwarf.a
Reported by: dim, ler, krion
Reviewed by: imp, emaste
Fixes: dbf05458e3 ("libdwarf: Support consumption of compressed ELF sections")
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33419
Update a bunch of Makefile.depend files as
a result of adding Makefile.depend.options files
Reviewed by: bdrewery
MFC after: 1 week
Sponsored by: Juniper Networks
Differential Revision: https://reviews.freebsd.org/D22494
It's provided by sys.mk so there's no need to derive it from ${.CURDIR}.
Suggested by: ngie
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5998
These are no longer needed after the recent 'beforebuild: depend' changes
and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports
skipping 'make depend'.
Sponsored by: EMC / Isilon Storage Division
The main problem was bitrot after elftoolchain being swapped in for the
GNU toolchain.
This also reworks how the list of 'host allowed' libraries is determined
to only allow INTERNALLIBs, which is needed for libelftc to come in.
For usr.bin/readelf use the same hack, as libelf and libdward, to bring in
the needed sys/ headers for host builds. This has not yet been a problem due
to readelf not being built as a host tool in buildworld. This is possible
in the meta build though when building the toolchain.
Sponsored by: EMC / Isilon Storage Division
Tracking these leads to situations where meta mode will consider the
file to be out of date if /bin/sh or /bin/ln are newer than the source
file. There's no reason for meta mode to do this as make is already
handling the rebuild dependency fine.
Sponsored by: EMC / Isilon Storage Division
This both avoids some dependencies on xinstall.host and allows
bootstrapping on older releases to work due to lack of at least 'install -l'
support.
Sponsored by: EMC / Isilon Storage Division
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.
Still need to add real targets under targets/ to build packages.
Differential Revision: D2796
Reviewed by: brooks imp
This includes a number of libdwarf improvements (particularly DWARF4
related) and updates to elftoolchain tools such as strip(1). It also
includes a large number of miscellaneous fixes (memory leaks, sign and
cast warnings, integer overflow and underflow, etc.).
This is a merge of r276167,276170-276172 from the
projects/elftoolchain-update-r3130 branch.
Sponsored by: The FreeBSD Foundation
properly include sys/ headers from the source tree instead of the
host.
These patches are also applied to libdwarf since libdwarf requires
the same sys/ headers as libelf.
This self-written compiler warning, which is hopefully going to be
committed into LLVM sources soon, warns about potentially missing
`static' keywords, similar to -Wmissing-prototypes.
- bin/pax: Move external declaration of chdname and s_mask into extern.h.
- bin/setfacl: Move setfacl.c-specific stuff out of setfacl.h.
- sbin/mount_fusefs: Remove char *progname; use getprogname().
- others: add `static' where possible.
Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and
lower it when needed.
I'm setting WARNS?=0 for secure/. It seems secure/ includes the
Makefile.inc provided by lib/. I'm not going to touch that directory.
Most of the code there is contributed anyway.
preparation for 8.0-RELEASE. Add the previous version of those
libraries to ObsoleteFiles.inc and bump __FreeBSD_Version.
Reviewed by: kib
Approved by: re (rwatson)
structs had incorrect member offsets, limiting dtrace's usefulness
when working with them. An example of incorrect info (struct
rtentry) from before this fix:
<1738> STRUCT rtentry (200 bytes)
rt_nodes type=1731 off=0
rt_gateway type=849 off=65280 <== WRONG, should be 8 * 96
rt_flags type=3 off=65344 <== wrong again, and so on..
...
Approved by: re (kib), gnn (mentor)
MFC after: 2 weeks