On 14.08.2024 10:34, Frediano Ziglio wrote: > If code is loaded by EFI the loader will relocate the image > under 4GB. This causes offsets in x86 code generated by > sym_offs(SYMBOL) to be relocated too (basically they won't be > offsets from image base).
In turn meaning that ... > --- a/xen/arch/x86/boot/head.S > +++ b/xen/arch/x86/boot/head.S > @@ -380,7 +380,8 @@ x86_32_switch: > lgdt gdt_boot_descr(%rip) > > /* Store Xen image load base address in place accessible for 32-bit > code. */ > - lea __image_base__(%rip),%esi > + lea __image_base__(%rip), %esi > + sub $sym_offs(__image_base__), %esi ... the comment needs updating too then, as %esi won't necessarily hold the load base address any longer (if I understand correctly what's going on here). Jan