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.
Unified · Split
| @@ -35,10 +35,11 @@ typedef __s64 Elf64_Sxword; · 34 unmodified lines | ||
| 35 | 35 | #define PT_HIOS 0x6fffffff /* OS-specific */ |
| 36 | 36 | #define PT_LOPROC 0x70000000 |
| 37 | 37 | #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) | |
| 41 | 39 | #define PT_GNU_STACK (PT_LOOS + 0x474e551) |
| 40 | +#define PT_GNU_RELRO (PT_LOOS + 0x474e552) | |
| 41 | +#define PT_GNU_PROPERTY (PT_LOOS + 0x474e553) | |
| 42 | + | |
| 42 | 43 | |
| 43 | 44 | /* |
| 44 | 45 | * Extended Numbering |