2009-06-26 Pavel Roskin <proski@gnu.org>
* include/grub/types.h: Define GRUB_TARGET_WORDSIZE. * include/grub/elf.h: Define symbols without "32" or "64" based on GRUB_TARGET_WORDSIZE. * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE. * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own ELF definitions. * efiemu/loadcore64.c: Likewise. * loader/i386/bsd32.c: Likewise. * loader/i386/bsd64.c: Likewise. * kern/dl.c: Remove own ELF definitions. * util/i386/efi/grub-mkimage.c: Likewise.
This commit is contained in:
parent
9bbdfd4d3b
commit
c402ab1734
10 changed files with 71 additions and 81 deletions
|
@ -2330,4 +2330,44 @@ typedef Elf32_Addr Elf32_Conflict;
|
|||
|
||||
#define R_X86_64_NUM 24
|
||||
|
||||
#if GRUB_TARGET_WORDSIZE == 32
|
||||
|
||||
typedef Elf32_Addr Elf_Addr;
|
||||
typedef Elf32_Ehdr Elf_Ehdr;
|
||||
typedef Elf32_Half Elf_Half;
|
||||
typedef Elf32_Off Elf_Off;
|
||||
typedef Elf32_Rel Elf_Rel;
|
||||
typedef Elf32_Rela Elf_Rela;
|
||||
typedef Elf32_Section Elf_Section;
|
||||
typedef Elf32_Shdr Elf_Shdr;
|
||||
typedef Elf32_Sym Elf_Sym;
|
||||
typedef Elf32_Word Elf_Word;
|
||||
|
||||
#define ELF_ST_BIND(val) ELF32_ST_BIND(val)
|
||||
#define ELF_ST_TYPE(val) ELF32_ST_TYPE(val)
|
||||
#define ELF_R_SYM(val) ELF32_R_SYM(val)
|
||||
#define ELF_R_TYPE(val) ELF32_R_TYPE(val)
|
||||
#define ELF_R_INFO(sym, type) ELF32_R_INFO(sym, type)
|
||||
|
||||
#elif GRUB_TARGET_WORDSIZE == 64
|
||||
|
||||
typedef Elf64_Addr Elf_Addr;
|
||||
typedef Elf64_Ehdr Elf_Ehdr;
|
||||
typedef Elf64_Half Elf_Half;
|
||||
typedef Elf64_Off Elf_Off;
|
||||
typedef Elf64_Rel Elf_Rel;
|
||||
typedef Elf64_Rela Elf_Rela;
|
||||
typedef Elf64_Section Elf_Section;
|
||||
typedef Elf64_Shdr Elf_Shdr;
|
||||
typedef Elf64_Sym Elf_Sym;
|
||||
typedef Elf64_Word Elf_Word;
|
||||
|
||||
#define ELF_ST_BIND(val) ELF64_ST_BIND (val)
|
||||
#define ELF_ST_TYPE(val) ELF64_ST_TYPE (val)
|
||||
#define ELF_R_SYM(val) ELF64_R_SYM(val)
|
||||
#define ELF_R_TYPE(val) ELF64_R_TYPE(val)
|
||||
#define ELF_R_INFO(sym, type) ELF64_R_INFO(sym, type)
|
||||
|
||||
#endif /* GRUB_TARGET_WORDSIZE == 64 */
|
||||
|
||||
#endif /* ! GRUB_ELF_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue