Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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>
  • Loading branch information
mcb30 committed May 9, 2016
1 parent 17c6f32 commit 45cd68c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/util/elf2efi.c
Expand Up @@ -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
Expand Down

0 comments on commit 45cd68c

Please sign in to comment.