History

ELF: Properly redefine PT_GNU_* in terms of PT_LOOS

The PT_GNU_* program header types are actually offsets from PT_LOOS, so redefine them as such, reorder them, and add the missing PT_GNU_RELRO.

Kees Cook committed 4 years ago

Commit 4f0bfdf1 parent 7dc6ea71 file · +4 −3Browse files

Unified · Split

include/uapi/linux/elf.h+4−3
@@ -35,10 +35,11 @@ typedef __s64 Elf64_Sxword; · 34 unmodified lines
3535 #define PT_HIOS 0x6fffffff /* OS-specific */
3636 #define PT_LOPROC 0x70000000
3737 #define PT_HIPROC 0x7fffffff
38−#define PT_GNU_EH_FRAME 0x6474e550
39−#define PT_GNU_PROPERTY 0x6474e553
40−
38+#define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550)
4139 #define PT_GNU_STACK (PT_LOOS + 0x474e551)
40+#define PT_GNU_RELRO (PT_LOOS + 0x474e552)
41+#define PT_GNU_PROPERTY (PT_LOOS + 0x474e553)
42+
4243
4344 /*
4445 * Extended Numbering