On 09.12.2025 00:00, Jason Andryuk wrote:
> On 2025-12-08 03:56, Jan Beulich wrote:
>> On 05.12.2025 23:28, Jason Andryuk wrote:
>>> When linking to create xen-syms, add --gc-sections to garbage collect
>>> unused stuff.
>>
>> What about xen.efi?
> 
> I tried briefly and it fails to link.  The GCC manual says it is 
> considered experimental for PE and COFF.

The gcc manual documents linker behavior? Do you have a more concrete pointer?

> I just added into EFI_LDFLAGS:
>    CC      .xen.efi.0s.o
> ld -mi386pep --no-warn-rwx-segments --subsystem=10 
> --enable-long-section-names --disable-high-entropy-va --dynamicbase 
> --image-base=0xffff82d040000000 --stack=0,0 --heap=0,0 
> --section-alignment=0x200000 --file-alignment=0x20 
> --major-image-version=4 --minor-image-version=22 --major-os-version=2 
> --minor-os-version=0 --major-subsystem-version=2 
> --minor-subsystem-version=0 --gc-sections --print-gc-sections 
> --build-id=sha1 -T arch/x86/efi.lds prelink.o  ./.xen.efi.0s.o -b 
> pe-x86-64 arch/x86/efi/buildid.o -o ./.xen.efi.0xffff82d040000000.0 && :
> ld: kexec_reloc is too large
> ld: kexec_reloc is too large
> ld: 
> prelink.o:/home/jandryuk/xen/xen/arch/x86/boot/head.S:60:(.text.header+0x48): 
> undefined reference to `start'

I see. This then would want mentioning in the patch description. And I've added
it to my binutils side todo list.

Jan

Reply via email to