Message ID | 1359378779-1884-1-git-send-email-riku.voipio@linaro.org |
---|---|
State | Accepted |
Headers | show |
diff --git a/src/local-elf.h b/src/local-elf.h index afcc8ed..306147e 100644 --- a/src/local-elf.h +++ b/src/local-elf.h @@ -37,7 +37,17 @@ #define ELF_TARG_VER EV_CURRENT -#if defined(__alpha__) +#if defined(__aarch64__) + +#define ELF_TARG_MACH EM_AARCH64 +#define ELF_TARG_CLASS ELFCLASS64 +#if defined(__AARCH64EB__) +#define ELF_TARG_DATA ELFDATA2MSB +#else +#define ELF_TARG_DATA ELFDATA2LSB +#endif + +#elif defined(__alpha__) #define ELF_TARG_MACH EM_ALPHA #define ELF_TARG_CLASS ELFCLASS64
ELF_TARG_MACH picked up from kernel headers. Current Aarch64 implementations are LE, but BE implementations are possible as well. With this patch libbsd builds on Aarch64 and passes testsuite on LE simulator. Signed-off-by: Riku Voipio <riku.voipio@linaro.org> --- src/local-elf.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)