summaryrefslogtreecommitdiff
path: root/output/elf.h
diff options
context:
space:
mode:
Diffstat (limited to 'output/elf.h')
-rw-r--r--output/elf.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/output/elf.h b/output/elf.h
index 32f5b47a..72b43073 100644
--- a/output/elf.h
+++ b/output/elf.h
@@ -160,7 +160,11 @@
#define SHT_REL 9
#define SHT_SHLIB 10
#define SHT_DYNSYM 11
-#define SHT_NUM 12
+#define SHT_INIT_ARRAY 14
+#define SHT_FINI_ARRAY 15
+#define SHT_PREINIT_ARRAY 16
+#define SHT_GROUP 17
+#define SHT_SYMTAB_SHNDX 18
#define SHT_LOPROC 0x70000000
#define SHT_HIPROC 0x7fffffff
#define SHT_LOUSER 0x80000000
@@ -179,14 +183,25 @@
#define SHF_TLS (1 << 10) /* Section hold thread-local data. */
/* Special section numbers */
-#define SHN_UNDEF 0
+#define SHN_UNDEF 0x0000
#define SHN_LORESERVE 0xff00
#define SHN_LOPROC 0xff00
#define SHN_HIPROC 0xff1f
#define SHN_ABS 0xfff1
#define SHN_COMMON 0xfff2
+#define SHN_XINDEX 0xffff
#define SHN_HIRESERVE 0xffff
+/* Same, but signed/sign-extended */
+#define XSHN_UNDEF ((int16_t)SHN_UNDEF)
+#define XSHN_LORESERVE ((int16_t)SHN_LORESERVE)
+#define XSHN_LOPROC ((int16_t)SHN_LOPROC)
+#define XSHN_HIPROC ((int16_t)SHN_HIPROC)
+#define XSHN_ABS ((int16_t)SHN_ABS)
+#define XSHN_COMMON ((int16_t)SHN_COMMON)
+#define XSHN_XINDEX ((int16_t)SHN_XINDEX)
+#define XSHN_HIRESERVE ((int16_t)SHN_HIRESERVE)
+
/* Section align flag */
#define SHA_ANY 1 /* No alignment constraint */