boot/efi: fix dummy reloc for x86

Change-Id: Ia61d593c8d131bd6780688ea932b5b92bd629764
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4748
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Fredrik Holmqvist <[email protected]>
This commit is contained in:
David Karoly
2021-12-14 19:56:21 +00:00
committed by Fredrik Holmqvist
parent 1a7afaa45b
commit f0adfe2a54
@@ -58,19 +58,18 @@ _start:
popl %ebx popl %ebx
testl %eax,%eax testl %eax,%eax
jne .exit jne .exit
call efi_main # call app with "image" and "systab" argument call efi_main # call app with "image" and "systab" argument
.exit: leave .exit: leave
ret ret
// hand-craft a dummy .reloc section so EFI knows it's a relocatable executable: // hand-craft a dummy .reloc section so EFI knows it's a relocatable executable:
// we're using relocation type IMAGE_REL_BASED_ABSOLUTE which is ignored
.data
dummy: .long 0
#define IMAGE_REL_ABSOLUTE 0 #define IMAGE_REL_ABSOLUTE 0
.section .reloc .section .reloc
.long dummy // Page RVA .long 0 // Page RVA
.long 10 // Block Size (2*4+2) .long 12 // Block Size (2*4+2*2)
.word (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy .word (IMAGE_REL_ABSOLUTE<<12) + 0
.word (IMAGE_REL_ABSOLUTE<<12) + 0