From: Heinrich Schuchardt Date: Thu, 25 Oct 2018 18:22:16 +0200 Subject: [U-Boot] [PATCH] x86: Fix car_uninit weak symbol definition In-Reply-To: <1540461937-10542-1-git-send-email-bmeng.cn@gmail.com> References: <1540461937-10542-1-git-send-email-bmeng.cn@gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 00000000 car_uninit > fff00091 000df402 R_386_PC32 00000000 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 > 00000000 w *UND* 00000000 car_uninit > > With this fix, it is normal now. > > $ objdump -t u-boot | grep car_uninit > fff00094 w F .text.start 00000001 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