From b94c7a4b07f96f24ae7411780abf874416549f7b Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Wed, 9 Mar 2016 23:58:17 -0800 Subject: Refactor pk, bbl, machine into separate libraries Yuck. --- pk/elf.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pk/elf.h') diff --git a/pk/elf.h b/pk/elf.h index a05ccf2..df876e9 100644 --- a/pk/elf.h +++ b/pk/elf.h @@ -12,6 +12,14 @@ #define IS_ELF32(hdr) (IS_ELF(hdr) && (hdr).e_ident[4] == 1) #define IS_ELF64(hdr) (IS_ELF(hdr) && (hdr).e_ident[4] == 2) +#ifdef __riscv64 +# define Elf_Ehdr Elf64_Ehdr +# define Elf_Phdr Elf64_Phdr +#else +# define Elf_Ehdr Elf32_Ehdr +# define Elf_Phdr Elf32_Phdr +#endif + #define ET_EXEC 2 #define ET_DYN 3 -- cgit v1.1