diff options
Diffstat (limited to 'arch/powerpc/boot')
-rw-r--r-- | arch/powerpc/boot/Makefile | 3 | ||||
-rw-r--r-- | arch/powerpc/boot/elf_util.c | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 717a3bc1352e..6403275553ea 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile | |||
@@ -310,8 +310,11 @@ $(obj)/dtbImage.%: vmlinux $(wrapperbits) $(obj)/%.dtb | |||
310 | $(obj)/vmlinux.strip: vmlinux | 310 | $(obj)/vmlinux.strip: vmlinux |
311 | $(STRIP) -s -R .comment $< -o $@ | 311 | $(STRIP) -s -R .comment $< -o $@ |
312 | 312 | ||
313 | # The iseries hypervisor won't take an ET_DYN executable, so this | ||
314 | # changes the type (byte 17) in the file to ET_EXEC (2). | ||
313 | $(obj)/zImage.iseries: vmlinux | 315 | $(obj)/zImage.iseries: vmlinux |
314 | $(STRIP) -s -R .comment $< -o $@ | 316 | $(STRIP) -s -R .comment $< -o $@ |
317 | printf "\x02" | dd of=$@ conv=notrunc bs=1 seek=17 | ||
315 | 318 | ||
316 | $(obj)/uImage: vmlinux $(wrapperbits) | 319 | $(obj)/uImage: vmlinux $(wrapperbits) |
317 | $(call if_changed,wrap,uboot) | 320 | $(call if_changed,wrap,uboot) |
diff --git a/arch/powerpc/boot/elf_util.c b/arch/powerpc/boot/elf_util.c index 7454aa4cc20c..1567a0c0f05c 100644 --- a/arch/powerpc/boot/elf_util.c +++ b/arch/powerpc/boot/elf_util.c | |||
@@ -27,7 +27,8 @@ int parse_elf64(void *hdr, struct elf_info *info) | |||
27 | elf64->e_ident[EI_MAG3] == ELFMAG3 && | 27 | elf64->e_ident[EI_MAG3] == ELFMAG3 && |
28 | elf64->e_ident[EI_CLASS] == ELFCLASS64 && | 28 | elf64->e_ident[EI_CLASS] == ELFCLASS64 && |
29 | elf64->e_ident[EI_DATA] == ELFDATA2MSB && | 29 | elf64->e_ident[EI_DATA] == ELFDATA2MSB && |
30 | elf64->e_type == ET_EXEC && | 30 | (elf64->e_type == ET_EXEC || |
31 | elf64->e_type == ET_DYN) && | ||
31 | elf64->e_machine == EM_PPC64)) | 32 | elf64->e_machine == EM_PPC64)) |
32 | return 0; | 33 | return 0; |
33 | 34 | ||
@@ -58,7 +59,8 @@ int parse_elf32(void *hdr, struct elf_info *info) | |||
58 | elf32->e_ident[EI_MAG3] == ELFMAG3 && | 59 | elf32->e_ident[EI_MAG3] == ELFMAG3 && |
59 | elf32->e_ident[EI_CLASS] == ELFCLASS32 && | 60 | elf32->e_ident[EI_CLASS] == ELFCLASS32 && |
60 | elf32->e_ident[EI_DATA] == ELFDATA2MSB && | 61 | elf32->e_ident[EI_DATA] == ELFDATA2MSB && |
61 | elf32->e_type == ET_EXEC && | 62 | (elf32->e_type == ET_EXEC || |
63 | elf32->e_type == ET_DYN) && | ||
62 | elf32->e_machine == EM_PPC)) | 64 | elf32->e_machine == EM_PPC)) |
63 | return 0; | 65 | return 0; |
64 | 66 | ||