update elf.h with powerpc64 elfv2 abi related macros
[musl] / include / elf.h
index c748c44..1bfe016 100644 (file)
@@ -210,6 +210,7 @@ typedef struct {
 #define EM_MN10200     90
 #define EM_PJ          91
 #define EM_OR1K                92
+#define EM_OPENRISC    92
 #define EM_ARC_A5      93
 #define EM_XTENSA      94
 #define EM_AARCH64     183
@@ -319,7 +320,7 @@ typedef struct {
 #define SHF_MASKOS          0x0ff00000
 #define SHF_MASKPROC        0xf0000000
 #define SHF_ORDERED         (1 << 30)
-#define SHF_EXCLUDE         (1 << 31)
+#define SHF_EXCLUDE         (1U << 31)
 
 #define GRP_COMDAT     0x1
 
@@ -2013,6 +2014,15 @@ typedef Elf32_Addr Elf32_Conflict;
 #define R_PPC64_DTPREL16_HIGHERA 104
 #define R_PPC64_DTPREL16_HIGHEST 105
 #define R_PPC64_DTPREL16_HIGHESTA 106
+#define R_PPC64_TLSGD          107
+#define R_PPC64_TLSLD          108
+#define R_PPC64_TOCSAVE                109
+#define R_PPC64_ADDR16_HIGH    110
+#define R_PPC64_ADDR16_HIGHA   111
+#define R_PPC64_TPREL16_HIGH   112
+#define R_PPC64_TPREL16_HIGHA  113
+#define R_PPC64_DTPREL16_HIGH  114
+#define R_PPC64_DTPREL16_HIGHA 115
 
 
 #define R_PPC64_JMP_IREL       247
@@ -2022,14 +2032,20 @@ typedef Elf32_Addr Elf32_Conflict;
 #define R_PPC64_REL16_HI       251
 #define R_PPC64_REL16_HA       252
 
+#define EF_PPC64_ABI   3
 
 #define DT_PPC64_GLINK  (DT_LOPROC + 0)
 #define DT_PPC64_OPD   (DT_LOPROC + 1)
 #define DT_PPC64_OPDSZ (DT_LOPROC + 2)
-#define DT_PPC64_NUM    3
-
+#define DT_PPC64_OPT   (DT_LOPROC + 3)
+#define DT_PPC64_NUM   4
 
+#define PPC64_OPT_TLS          1
+#define PPC64_OPT_MULTI_TOC    2
 
+#define STO_PPC64_LOCAL_BIT    5
+#define STO_PPC64_LOCAL_MASK   0xe0
+#define PPC64_LOCAL_ENTRY_OFFSET(x) (1 << (((x)&0xe0)>>5) & 0xfc)
 
 
 #define EF_ARM_RELEXEC         0x01
@@ -2498,6 +2514,14 @@ typedef Elf32_Addr Elf32_Conflict;
 #define        R_SH_RELATIVE           165
 #define        R_SH_GOTOFF             166
 #define        R_SH_GOTPC              167
+#define        R_SH_GOT20              201
+#define        R_SH_GOTOFF20           202
+#define        R_SH_GOTFUNCDESC        203
+#define        R_SH_GOTFUNCDEST20      204
+#define        R_SH_GOTOFFFUNCDESC     205
+#define        R_SH_GOTOFFFUNCDEST20   206
+#define        R_SH_FUNCDESC           207
+#define        R_SH_FUNCDESC_VALUE     208
 
 #define        R_SH_NUM                256