Remove any awareness of *.c util files about target.
* Makefile.util.def (grub-setup): Split to ... (grub-bios-setup): ... and this. (grub-sparc64-setup): ... and this. * configure.ac: Don't add machine_CPPFLAGS into HOST_CPPFLAGS. * docs/man/grub-setup.h2m: Split into ... * docs/man/grub-sparc64-setup.h2m: ... this. * docs/man/grub-bios-setup.h2m: ... and this. * include/grub/dl.h (grub_dl) [GRUB_UTIL]: Remove struct. * include/grub/elf.h (Elf_*) [GRUB_UTIL]: Remove types. (GRUB_TARGET_WORDSIZE) [GRUB_UTIL]: Remove. (grub_target_addr_t): Remove. (grub_target_size_t): Remove. (grub_target_ssize_t): Remove. * util/grub-install.in: Use new grub-*-setup. * util/grub-mkimagexx.c (Elf_Word): New define. (Elf_Half): Likewise. (Elf_Section): Likewise. (ELF_ST_TYPE): Likewise. * util/grub-setup.c: Switch from GRUB_MACHINE_SPARC64 to GRUB_SETUP_SPARC64 and from GRUB_MACHINE_PCBIOS to GRUB_SETUP_BIOS.
This commit is contained in:
parent
584b2f8a22
commit
c36e5cd162
11 changed files with 104 additions and 40 deletions
|
@ -31,8 +31,12 @@
|
|||
# define Elf_Shdr Elf32_Shdr
|
||||
# define Elf_Rela Elf32_Rela
|
||||
# define Elf_Rel Elf32_Rel
|
||||
# define Elf_Word Elf32_Word
|
||||
# define Elf_Half Elf32_Half
|
||||
# define Elf_Section Elf32_Section
|
||||
# define ELF_R_SYM(val) ELF32_R_SYM(val)
|
||||
# define ELF_R_TYPE(val) ELF32_R_TYPE(val)
|
||||
# define ELF_ST_TYPE(val) ELF32_ST_TYPE(val)
|
||||
#elif defined(MKIMAGE_ELF64)
|
||||
# define SUFFIX(x) x ## 64
|
||||
# define ELFCLASSXX ELFCLASS64
|
||||
|
@ -44,8 +48,12 @@
|
|||
# define Elf_Shdr Elf64_Shdr
|
||||
# define Elf_Rela Elf64_Rela
|
||||
# define Elf_Rel Elf64_Rel
|
||||
# define Elf_Word Elf64_Word
|
||||
# define Elf_Half Elf64_Half
|
||||
# define Elf_Section Elf64_Section
|
||||
# define ELF_R_SYM(val) ELF64_R_SYM(val)
|
||||
# define ELF_R_TYPE(val) ELF64_R_TYPE(val)
|
||||
# define ELF_ST_TYPE(val) ELF64_ST_TYPE(val)
|
||||
#else
|
||||
#error "I'm confused"
|
||||
#endif
|
||||
|
@ -1095,3 +1103,7 @@ SUFFIX (load_image) (const char *kernel_path, grub_size_t *exec_size,
|
|||
#undef Elf_Rel
|
||||
#undef ELF_R_TYPE
|
||||
#undef ELF_R_SYM
|
||||
#undef Elf_Word
|
||||
#undef Elf_Half
|
||||
#undef Elf_Section
|
||||
#undef ELF_ST_TYPE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue