add SHF_COMPRESSED section flag to elf.h
authorSzabolcs Nagy <nsz@port70.net>
Wed, 20 Apr 2016 11:19:08 +0000 (13:19 +0200)
committerRich Felker <dalias@aerifal.cx>
Sun, 3 Jul 2016 20:15:12 +0000 (16:15 -0400)
following
http://www.sco.com/developers/gabi/latest/ch4.sheader.html

include/elf.h

index eefcbc1..223a343 100644 (file)
@@ -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 {