Fix LD error while linking LoongArch EFI binary (#457)

This commit is contained in:
Sam Demeulemeester 2024-11-25 17:39:00 +01:00 committed by GitHub
parent 5a046291fa
commit bdefff91ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -183,7 +183,9 @@ memtest.debug: memtest_shared
memtest.efi: memtest_shared.bin boot/loongarch/header.o ldscripts/memtest_efi.lds
$(eval SIZES=$(shell size -B -d memtest_shared | grep memtest_shared))
$(LD) --defsym=_bss_size=$(word 3,$(SIZES)) -T ldscripts/memtest_efi.lds boot/loongarch/header.o -b binary memtest_shared.bin -o memtest.efi
$(LD) --defsym=_bss_size=$(word 3,$(SIZES)) -T ldscripts/memtest_efi.lds boot/loongarch/header.o -b binary memtest_shared.bin -o memtest.elf
$(OBJCOPY) -O binary memtest.elf memtest.efi
rm -f memtest.elf
esp.img: memtest.efi
@mkdir -p iso/EFI/BOOT

View File

@ -1,4 +1,4 @@
OUTPUT_FORMAT("binary")
OUTPUT_FORMAT("elf64-loongarch")
OUTPUT_ARCH(loongarch)
ENTRY(head);