diff options
author | Michael Brown | 2016-05-09 17:16:43 +0200 |
---|---|---|
committer | Michael Brown | 2016-05-09 17:18:10 +0200 |
commit | 45cd68c0fb45bc8d83adc3832a6ed08a02bee822 (patch) | |
tree | 64b5756d37614644c55c911c8e5c4440d2960f58 /src/util | |
parent | [arm] Add support for 64-bit ARM (Aarch64) (diff) | |
download | ipxe-45cd68c0fb45bc8d83adc3832a6ed08a02bee822.tar.gz ipxe-45cd68c0fb45bc8d83adc3832a6ed08a02bee822.tar.xz ipxe-45cd68c0fb45bc8d83adc3832a6ed08a02bee822.zip |
[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>
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/elf2efi.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/util/elf2efi.c b/src/util/elf2efi.c index a93010dc..152bf533 100644 --- a/src/util/elf2efi.c +++ b/src/util/elf2efi.c @@ -72,6 +72,28 @@ #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 |