diff options
author | Christian S.J. Peron <csjp@FreeBSD.org> | 2019-06-07 14:51:55 +0000 |
---|---|---|
committer | Christian S.J. Peron <csjp@FreeBSD.org> | 2019-06-07 14:51:55 +0000 |
commit | ca3075599a3c4ea5c627c292545a8c944d6382d7 (patch) | |
tree | 77ac3cdfca3fc85d63a13e954921982dd157666d /sys/sys/elf_common.h | |
parent | cb1ee1bf9becc1a59270873f81fcab0dca017a49 (diff) | |
download | src-ca3075599a3c4ea5c627c292545a8c944d6382d7.tar.gz src-ca3075599a3c4ea5c627c292545a8c944d6382d7.zip |
Teach readelf about some OpenBSD ELF program headers
- Add constants for OpenBSD wxneeded, bootdata and randomize to the
FreeBSD elf_common.h file. This is the file that gets used by the
elftoolchain library.
- Update readelf and elfdump utilities to decode these program headers
if they are encountered.
Note: FreeBSD has it's own version of elfdump(1), which will be updated
in a subsequent commit. I am adding it here anyway because this diff is
going to be submitted upstream.
Discussed with: emaste
Reviewed by: imp
MFC afer: 2 weeks
Differential Revision: https://reviews.freebsd.org/D20548
M contrib/elftoolchain/elfdump/elfdump.c
M contrib/elftoolchain/readelf/readelf.c
M sys/sys/elf_common.h
Notes
Notes:
svn path=/head/; revision=348776
Diffstat (limited to 'sys/sys/elf_common.h')
-rw-r--r-- | sys/sys/elf_common.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h index 86ae3f2e3998..6232756fa06e 100644 --- a/sys/sys/elf_common.h +++ b/sys/sys/elf_common.h @@ -535,6 +535,10 @@ typedef struct { #define PT_ARM_EXIDX 0x70000001 /* ARM exception unwind tables. */ #define PT_HIPROC 0x7fffffff /* Last processor-specific type. */ +#define PT_OPENBSD_RANDOMIZE 0x65A3DBE6 /* OpenBSD random data segment */ +#define PT_OPENBSD_WXNEEDED 0x65A3DBE7 /* OpenBSD EXEC/WRITE pages needed */ +#define PT_OPENBSD_BOOTDATA 0x65A41BE6 /* OpenBSD section for boot args */ + /* Values for p_flags. */ #define PF_X 0x1 /* Executable. */ #define PF_W 0x2 /* Writable. */ |