]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[efi] Allow for building with older versions of elf.h system header
authorMichael Brown <mcb30@ipxe.org>
Mon, 9 May 2016 15:16:43 +0000 (16:16 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 9 May 2016 15:18:10 +0000 (16:18 +0100)
Reported-by: Ahmad Mahagna <ahmhad@mellanox.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/util/elf2efi.c

index a93010dc7e3d34e0ff2700f5c910320c674ce650..152bf533356cfd568cbbf2d607a205d6074dfe49 100644 (file)
 
 #define ELF_MREL( mach, type ) ( (mach) | ( (type) << 16 ) )
 
+/* Allow for building with older versions of elf.h */
+#ifndef EM_AARCH64
+#define EM_AARCH64 183
+#define R_AARCH64_NONE 0
+#define R_AARCH64_ABS64 257
+#define R_AARCH64_CALL26 283
+#define R_AARCH64_JUMP26 282
+#define R_AARCH64_ADR_PREL_LO21 274
+#define R_AARCH64_ADR_PREL_PG_HI21 275
+#define R_AARCH64_ADD_ABS_LO12_NC 277
+#define R_AARCH64_LDST8_ABS_LO12_NC 278
+#define R_AARCH64_LDST16_ABS_LO12_NC 284
+#define R_AARCH64_LDST32_ABS_LO12_NC 285
+#define R_AARCH64_LDST64_ABS_LO12_NC 286
+#endif /* EM_AARCH64 */
+#ifndef R_ARM_CALL
+#define R_ARM_CALL 28
+#endif
+#ifndef R_ARM_THM_JUMP24
+#define R_ARM_THM_JUMP24 30
+#endif
+
 /* Seems to be missing from elf.h */
 #ifndef R_AARCH64_NULL
 #define R_AARCH64_NULL 256