Re: [U-Boot] [PATCH] x86: Fix car_uninit weak symbol definition
On Fri, Oct 26, 2018 at 12:22 AM Heinrich Schuchardt wrote: > > On 10/25/2018 12:05 PM, Bin Meng wrote: > > Since commit 80df194f0165 ("x86: detect unsupported relocation types"), > > an error message is seen on QEMU x86 target during boot: > > > > do_elf_reloc_fixups32: unsupported relocation type 0x1 at fff841f0, offset > > = 0xfff00087 > > do_elf_reloc_fixups32: unsupported relocation type 0x2 at fff841f8, offset > > = 0xfff00091 > > > > Check offset 0xfff00087 and 0xfff00091 in the u-boot ELF image, > > > > fff00087 000df401 R_386_32 car_uninit > > fff00091 000df402 R_386_PC32 car_uninit > > > > we see R_386_32 and R_386_PC32 relocation type is generated for > > symbol car_uninit, which is declared as a weak symbol in start.S. > > > > However the actual weak symbol implementation ends up nowhere. As > > we can see below, it's *UND*. > > > > $ objdump -t u-boot | grep car_uninit > > w *UND* car_uninit > > > > With this fix, it is normal now. > > > > $ objdump -t u-boot | grep car_uninit > > fff00094 wF .text.start0001 car_uninit > > > > Reported-by: Hannes Schmelzer > > Signed-off-by: Bin Meng > > --- > > qemu-x86_defconfig works fine now. > > Tested-by: Heinrich Schuchardt > Reviewed-by: Heinrich Schuchardt applied to u-boot-x86, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] x86: Fix car_uninit weak symbol definition
On 10/25/18 12:05 PM, Bin Meng wrote: Since commit 80df194f0165 ("x86: detect unsupported relocation types"), an error message is seen on QEMU x86 target during boot: do_elf_reloc_fixups32: unsupported relocation type 0x1 at fff841f0, offset = 0xfff00087 do_elf_reloc_fixups32: unsupported relocation type 0x2 at fff841f8, offset = 0xfff00091 Check offset 0xfff00087 and 0xfff00091 in the u-boot ELF image, fff00087 000df401 R_386_32 car_uninit fff00091 000df402 R_386_PC32 car_uninit we see R_386_32 and R_386_PC32 relocation type is generated for symbol car_uninit, which is declared as a weak symbol in start.S. However the actual weak symbol implementation ends up nowhere. As we can see below, it's *UND*. $ objdump -t u-boot | grep car_uninit w *UND* car_uninit With this fix, it is normal now. My pp065 board is also working fine with this. Tested-by: Hannes Schmelzer ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] x86: Fix car_uninit weak symbol definition
On 10/25/2018 12:05 PM, Bin Meng wrote: > Since commit 80df194f0165 ("x86: detect unsupported relocation types"), > an error message is seen on QEMU x86 target during boot: > > do_elf_reloc_fixups32: unsupported relocation type 0x1 at fff841f0, offset = > 0xfff00087 > do_elf_reloc_fixups32: unsupported relocation type 0x2 at fff841f8, offset = > 0xfff00091 > > Check offset 0xfff00087 and 0xfff00091 in the u-boot ELF image, > > fff00087 000df401 R_386_32 car_uninit > fff00091 000df402 R_386_PC32 car_uninit > > we see R_386_32 and R_386_PC32 relocation type is generated for > symbol car_uninit, which is declared as a weak symbol in start.S. > > However the actual weak symbol implementation ends up nowhere. As > we can see below, it's *UND*. > > $ objdump -t u-boot | grep car_uninit > w *UND* car_uninit > > With this fix, it is normal now. > > $ objdump -t u-boot | grep car_uninit > fff00094 wF .text.start0001 car_uninit > > Reported-by: Hannes Schmelzer > Signed-off-by: Bin Meng > --- qemu-x86_defconfig works fine now. Tested-by: Heinrich Schuchardt Reviewed-by: Heinrich Schuchardt ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] x86: Fix car_uninit weak symbol definition
Since commit 80df194f0165 ("x86: detect unsupported relocation types"), an error message is seen on QEMU x86 target during boot: do_elf_reloc_fixups32: unsupported relocation type 0x1 at fff841f0, offset = 0xfff00087 do_elf_reloc_fixups32: unsupported relocation type 0x2 at fff841f8, offset = 0xfff00091 Check offset 0xfff00087 and 0xfff00091 in the u-boot ELF image, fff00087 000df401 R_386_32 car_uninit fff00091 000df402 R_386_PC32 car_uninit we see R_386_32 and R_386_PC32 relocation type is generated for symbol car_uninit, which is declared as a weak symbol in start.S. However the actual weak symbol implementation ends up nowhere. As we can see below, it's *UND*. $ objdump -t u-boot | grep car_uninit w *UND* car_uninit With this fix, it is normal now. $ objdump -t u-boot | grep car_uninit fff00094 wF .text.start0001 car_uninit Reported-by: Hannes Schmelzer Signed-off-by: Bin Meng --- arch/x86/cpu/start.S | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/x86/cpu/start.S b/arch/x86/cpu/start.S index e1f634f..30fa7de 100644 --- a/arch/x86/cpu/start.S +++ b/arch/x86/cpu/start.S @@ -16,6 +16,7 @@ #include #include #include +#include .section .text.start .code32 @@ -184,13 +185,8 @@ board_init_f_r_trampoline: movl%eax, %esp /* See if we need to disable CAR */ -.weak car_uninit - movl$car_uninit, %eax - cmpl$0, %eax - jz 1f - callcar_uninit -1: + /* Re-enter U-Boot by calling board_init_f_r() */ callboard_init_f_r @@ -199,6 +195,10 @@ die: jmp die hlt +WEAK(car_uninit) + ret +ENDPROC(car_uninit) + blank_idt_ptr: .word 0 /* limit */ .long 0 /* base */ -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot