Explorar el Código

[efi] Allow for building with older versions of elf.h system header

Reported-by: Ahmad Mahagna <ahmhad@mellanox.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown hace 8 años
padre
commit
45cd68c0fb
Se han modificado 1 ficheros con 22 adiciones y 0 borrados
  1. 22
    0
      src/util/elf2efi.c

+ 22
- 0
src/util/elf2efi.c Ver fichero

@@ -72,6 +72,28 @@
72 72
 
73 73
 #define ELF_MREL( mach, type ) ( (mach) | ( (type) << 16 ) )
74 74
 
75
+/* Allow for building with older versions of elf.h */
76
+#ifndef EM_AARCH64
77
+#define EM_AARCH64 183
78
+#define R_AARCH64_NONE 0
79
+#define R_AARCH64_ABS64 257
80
+#define R_AARCH64_CALL26 283
81
+#define R_AARCH64_JUMP26 282
82
+#define R_AARCH64_ADR_PREL_LO21 274
83
+#define R_AARCH64_ADR_PREL_PG_HI21 275
84
+#define R_AARCH64_ADD_ABS_LO12_NC 277
85
+#define R_AARCH64_LDST8_ABS_LO12_NC 278
86
+#define R_AARCH64_LDST16_ABS_LO12_NC 284
87
+#define R_AARCH64_LDST32_ABS_LO12_NC 285
88
+#define R_AARCH64_LDST64_ABS_LO12_NC 286
89
+#endif /* EM_AARCH64 */
90
+#ifndef R_ARM_CALL
91
+#define R_ARM_CALL 28
92
+#endif
93
+#ifndef R_ARM_THM_JUMP24
94
+#define R_ARM_THM_JUMP24 30
95
+#endif
96
+
75 97
 /* Seems to be missing from elf.h */
76 98
 #ifndef R_AARCH64_NULL
77 99
 #define R_AARCH64_NULL 256

Loading…
Cancelar
Guardar