From af17dc40dd91fbfc5a0ca487c52f6c419567f967 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Wed, 20 Apr 2016 13:19:08 +0200 Subject: [PATCH] add SHF_COMPRESSED section flag to elf.h following http://www.sco.com/developers/gabi/latest/ch4.sheader.html --- include/elf.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/include/elf.h b/include/elf.h index eefcbc11..223a3431 100644 --- a/include/elf.h +++ b/include/elf.h @@ -318,11 +318,34 @@ typedef struct { #define SHF_GROUP (1 << 9) #define SHF_TLS (1 << 10) +#define SHF_COMPRESSED (1 << 11) #define SHF_MASKOS 0x0ff00000 #define SHF_MASKPROC 0xf0000000 #define SHF_ORDERED (1 << 30) #define SHF_EXCLUDE (1U << 31) +typedef struct +{ + Elf32_Word ch_type; + Elf32_Word ch_size; + Elf32_Word ch_addralign; +} Elf32_Chdr; + +typedef struct +{ + Elf64_Word ch_type; + Elf64_Word ch_reserved; + Elf64_Xword ch_size; + Elf64_Xword ch_addralign; +} Elf64_Chdr; + +#define ELFCOMPRESS_ZLIB 1 +#define ELFCOMPRESS_LOOS 0x60000000 +#define ELFCOMPRESS_HIOS 0x6fffffff +#define ELFCOMPRESS_LOPROC 0x70000000 +#define ELFCOMPRESS_HIPROC 0x7fffffff + + #define GRP_COMDAT 0x1 typedef struct { -- 2.25.1