[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] xen/riscv: fix build issue for bullseye-riscv64 container
On 31.07.2024 17:37, Andrew Cooper wrote: > On 31/07/2024 4:07 pm, Oleksii Kurochko wrote: >> Address compilation error on bullseye-riscv64 container: >> undefined reference to `guest_physmap_remove_page` >> >> Since there is no current implementation of `guest_physmap_remove_page()`, >> a stub function has been added. >> >> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx> >> Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> > > Usually we do Fixes/Reported-by tags first. (We try to do tags in > chronological/logical order). > > I've confirmed this fixes the issue, so Acked-by: Andrew Cooper > <andrew.cooper3@xxxxxxxxxx> > > Having tried a different approach, > > user@3c393ef3b4c0:/build/xen$ make > UPD include/xen/compile.h > Xen 4.20-unstable > make[1]: Nothing to be done for 'include'. > make[1]: 'arch/riscv/include/asm/asm-offsets.h' is up to date. > CC common/version.o > LD common/built_in.o > CC arch/riscv/setup.o > LD arch/riscv/built_in.o > LD prelink.o > LDS arch/riscv/xen.lds > riscv64-linux-gnu-ld -T arch/riscv/xen.lds -N prelink.o \ > ./common/symbols-dummy.o -o ./.xen-syms.0 > riscv64-linux-gnu-ld: prelink.o: in function `register_keyhandler': > /build/xen/common/keyhandler.c:106: undefined reference to > `guest_physmap_remove_page' > riscv64-linux-gnu-ld: ./.xen-syms.0: hidden symbol > `guest_physmap_remove_page' isn't defined > riscv64-linux-gnu-ld: final link failed: bad value > make[2]: *** [arch/riscv/Makefile:15: xen-syms] Error 1 > make[1]: *** [build.mk:90: xen] Error 2 > make: *** [Makefile:610: xen] Error 2 > user@3c393ef3b4c0:/build/xen$ find . -name \*.o | while read F; do nm $F > | grep guest_physmap_remove_page && echo $F; done > U guest_physmap_remove_page > ./common/memory.o > U guest_physmap_remove_page > ./common/built_in.o > U guest_physmap_remove_page > ./prelink.o > > > despite the linker fingering keyhandler.c (very likely a toolchain bug), > it's memory.o which has the undefined reference. > > Looking at memory.i, there are calls in guest_remove_page(), > memory_exchange(), and do_memory_op(), and no obvious way to DCE any of > them. > > However, with bookworm, while memory.i does still have the same calls, > the resulting object file has no undefined references, so clearly > something has DCE'd them. The many stubs that have just BUG() in them result in a lot of DCE according to my checking (many functions or basic blocks end - somewhat confusingly - in a function call leading to such a stub). But apparently not enough with the older compiler version. Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |