llvm-project/llvm/test/tools/llvm-readobj
Alex Richardson 7dc3136033 [llvm-readobj] Add support for decoding FreeBSD ELF notes
The current support only printed coredump notes, but most binaries also
contain notes. This change adds names for four FreeBSD-specific notes and
pretty-prints three of them:

NT_FREEBSD_ABI_TAG:
This note holds a 32-bit (decimal) integer containing the value of the
__FreeBSD_version macro, which is defined in crt1.o and will hold a value
such as 1300076 for a binary build on a FreeBSD 13 system.

NT_FREEBSD_ARCH_TAG:
A string containing the value of the build-time MACHINE_ARCH

NT_FREEBSD_FEATURE_CTL: A 32-bit flag that indicates to the kernel that
the binary wants certain bevahiour. Examples include setting
NT_FREEBSD_FCTL_ASLR_DISABLE which tells the kernel to disable ASLR.

After this change llvm-readobj also no longer decodes coredump-only
FreeBSD notes in non-coredump files. I've also converted the
note-freebsd.s test to use yaml2obj instead of llvm-mc.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D74393
2021-02-09 16:59:22 +00:00
..
COFF [llvm-readobj] [ARMWinEH] Clearly print an invalid case of packed unwind info as such 2021-01-08 10:04:44 +02:00
ELF [llvm-readobj] Add support for decoding FreeBSD ELF notes 2021-02-09 16:59:22 +00:00
MachO [llvm-readobj] Don't print out section names for STABS symbols 2020-10-12 18:55:40 -07:00
XCOFF [XCOFF][llvm-readobj] Move XCOFF test to XCOFF directory 2020-08-11 17:31:59 +00:00
wasm [Object][WebAssembly] Update format of error messages 2021-01-25 21:12:53 -08:00
archive.test [llvm-readobj] - Remove Error.cpp,.h and drop dependencies in the code. 2020-09-01 16:46:17 +03:00
basic.test [test] Use host platform specific error message substitution in lit tests 2021-01-29 07:16:30 -05:00
macho-arm64e.test [Triple][MachO] Define "arm64e", an AArch64 subarch for Pointer Auth. 2020-12-03 07:53:59 -08:00
thin-archive.test [test] Use host platform specific error message substitution in lit tests 2021-01-29 07:16:30 -05:00