History log of /src/tools/ctfconvert |
Revision | Date | Author | Comments |
1.12 | 12-Apr-2025 |
rin | tools: Factor out Makefile.ctftools from ctf{convert,merge}
This adds missing libelf.a dependency to ctfmerge. Otherwise NFC.
|
1.11 | 01-Apr-2024 |
riastradh | branches: 1.11.2; elftoolchain: Be consistent about which ELF header files we use.
1. For tools that use elftoolchain: always use elftoolchain's elfdefinitions.h. Don't even think about looking at the host's sys/exec_elf.h, which makes no sense and should never happen.
(ELF tools that don't use elftoolchain, like m68k-elf2coff, continue to use nbincludes/sys/exec_elf.h. But no more nbincludes hacks in elftoolchain.)
2. For kernel components (solaris, zfs, dtrace): always use sys/exec_elf.h, even in Solaris components via sys/elf.h. elfdefinitions.h is not wired up in the kernel build at all.
3. For most userland components that involve libelf: use elfdefinitions.h via libelf header files (libelf.h, gelf.h).
libdtrace in particular requires _all_ R_* reloc type definitions, but sys/exec_elf.h brings in only the _current machine's_ R_* reloc type definitions. (While here: Use uintptr_t instead of Elf_Addr for pointer-to-integer cast, since Elf_Addr is MD and provided only by sys/exec_elf.h, not by elfdefinitions.h.)
And most userland components using libelf don't rely on any properties of the current machine from sys/exec_elf.h, so they can use libelf's elfdefinition.h.
Exceptions:
- dtrace drti.c relies on link.h -> link_elf.h -> sys/exec_elf.h, but it also relies on sys/dtrace.h -> sys/elf.h -> elfdefinitions.h like other userland components using sys/elf.h.
- kdump-ioctl.c uses sys/exec_elf.h directly and sys/dtrace.h -> sys/elf.h -> elfdefinitions like other userland components using sys/elf.h.
- t_ptrace_wait.c (via t_ptrace_core_wait.h) uses libelf to parse core files, but relies on sys/exec_elf.h for struct netbsd_elfcore_procinfo.
None of these exceptions needs all R_* reloc type definitions, so as a workaround, we can just suppress libelf's elfdefinitions.h by defining _SYS_ELFDEFINITIONS_H_ and use sys/exec_elf.h in these exceptions.
And undo the whole BUILTIN_ELF_HEADERS mistake. This was:
- half bogus workarounds for missing build_install dependencies in tools/Makefile, which are no longer missing now, and - half futile attempt to use src/sys/sys/exec_elf.h via nbincludes in tools involving libelf instead of libelf's elfdefinitions.h, which collides.
Longer-term, we may wish to unify sys/exec_elf.h and libelf's elfdefinitions.h, so we don't have to play these games.
But at least now the games are limited to three .c files (one of which is generated by Makefile.ioctl-c), rather than haphazardly applied tree-wide by monstrous kludges in widely used .h files with broken hackarounds to get the tools build lurching to completion.
|
1.10 | 18-Apr-2022 |
jkoshy | branches: 1.10.2; Update 'tools/ctf{merge,convert}' to use the new build locations for 'libelf' and 'libdwarf'.
|
1.9 | 01-May-2018 |
christos | Create a new bsd.hostinit.mk file and put the build definitions for all host programs there; make all Makefiles that use bsd.hostprog.mk include it. Namely turn off MKREPRO and don't make lint, man pages, info files etc. Remove the Makefile.inc files that contained these same settings, and remove the settings from Makefile.host
|
1.8 | 01-May-2018 |
christos | Centralize NOMAN handling.
|
1.7 | 01-May-2018 |
christos | PR/53238: Robert Elz: Disable MKREPRO in tools; the host compiler might not support the necessary options. This is done thusly:
1. Set MKREPRO=no in Makefile.host. This handles all the Makefiles that use it and don't include bsd.own.mk. 2. Create Makefile.inc and set MKREPRO=no in it. Change the Makefiles that include bsd.own.mk, to include bsd.init.mk which includes Makefile.inc first. This will also allow us to control other tools options from a single location if we need to.
XXX: pullup-8
|
1.6 | 17-Mar-2016 |
christos | branches: 1.6.8; 1.6.14; Add DPADD's
|
1.5 | 09-Mar-2014 |
christos | switch to the new libelf and libdwarf
|
1.4 | 27-Jan-2013 |
riastradh | Set NOMAN before including <bsd.own.mk> to really fix PR 47500.
(Hi, christos.)
|
1.3 | 24-Jan-2013 |
christos | Pr/47500: Henning Petersen: Don't install man pages for tools
|
1.2 | 19-Jun-2010 |
riz | branches: 1.2.6; 1.2.12; Rename Makefile.disklabel to Makefile.nbincludes, as this file has been used by more than disklabel for years. New name suggestion from mrg@ .
|
1.1 | 24-Feb-2010 |
darran | DTrace: add CTF tools to the toolchain (not built yet).
|
1.2.12.2 | 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.2.12.1 | 25-Feb-2013 |
tls | resync with head
|
1.2.6.1 | 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
1.6.14.1 | 02-May-2018 |
pgoyette | Synch with HEAD
|
1.6.8.1 | 05-May-2018 |
martin | Pull up following revision(s) (requested by christos in ticket #796):
tools/mdsetimage/Makefile: revision 1.15 tools/compat/Makefile: revision 1.82 tools/gdb/Makefile: revision 1.35 tools/lorder/Makefile: revision 1.13 tools/gcc/Makefile: revision 1.85 tools/dtc/Makefile: revision 1.3 tools/cvslatest/Makefile: revision 1.2 tools/ctfmerge/Makefile: revision 1.8 tools/libelf/Makefile: revision 1.9 tools/libdwarf/Makefile: revision 1.8 tools/ctfconvert/Makefile: revision 1.7 tools/makekeys/Makefile: revision 1.2 tools/gettext/Makefile: revision 1.7 tools/binstall/Makefile: revision 1.12 tools/libfdt/Makefile: revision 1.3 tools/libctf/Makefile: revision 1.7 tools/binutils/Makefile: revision 1.27 tools/mandoc/Makefile: revision 1.11 tools/Makefile.host: revision 1.32 tools/dbsym/Makefile: revision 1.13 tools/genassym/Makefile: revision 1.7 tools/Makefile.inc: revision 1.14
PR/53238: Robert Elz: Disable MKREPRO in tools; the host compiler might not support the necessary options. This is done thusly:
1. Set MKREPRO=no in Makefile.host. This handles all the Makefiles that use it and don't include bsd.own.mk. 2. Create Makefile.inc and set MKREPRO=no in it. Change the Makefiles that include bsd.own.mk, to include bsd.init.mk which includes Makefile.inc first. This will also allow us to control other tools options from a single location if we need to.
XXX: pullup-8
|
1.10.2.1 | 14-Apr-2025 |
martin | Pull up following revision(s) (requested by rin in ticket #1096):
tools/what/Makefile: revision 1.1 external/cddl/osnet/usr.bin/ctfdump/Makefile: revision 1.10 tools/ctfmerge/Makefile: revision 1.13 tools/Makefile: revision 1.228 tools/Makefile: revision 1.229 tools/Makefile.ctftools: revision 1.1 usr.bin/what/what.c: revision 1.16 tools/Makefile: revision 1.230 tools/ctfconvert/Makefile: revision 1.12 tools/ctfdump/Makefile: revision 1.1 external/cddl/osnet/dist/tools/ctf/dump/dump.c: revision 1.3 external/cddl/osnet/dist/tools/ctf/common/utils.c: revision 1.2 (all via patch)
tools: Factor out Makefile.ctftools from ctf{convert,merge}
This adds missing libelf.a dependency to ctfmerge. Otherwise NFC. tools: Add ctfdump(1) when MKCTF is enabled
Although this is not required for build, this small (only with three additional source files) tool provides good diagnostics.
Especially useful on non-BSD hosts. Tested on Ubuntu/amd64 24.04 and macOS 13.7 in addition to NetBSD.
tools: Add what(1); not mandatory, but provides good diagnostics
tools/Makefile: Add missing `\` for previous
|
1.11.2.1 | 02-Aug-2025 |
perseant | Sync with HEAD
|