diff --git a/src/system/boot/platform/efi/arch/x86/crt0-efi-x86.S b/src/system/boot/platform/efi/arch/x86/crt0-efi-x86.S index f9d5191ecb..6d08f9d1d9 100644 --- a/src/system/boot/platform/efi/arch/x86/crt0-efi-x86.S +++ b/src/system/boot/platform/efi/arch/x86/crt0-efi-x86.S @@ -58,19 +58,18 @@ _start: popl %ebx testl %eax,%eax jne .exit - + call efi_main # call app with "image" and "systab" argument .exit: leave ret - + // hand-craft a dummy .reloc section so EFI knows it's a relocatable executable: - - .data -dummy: .long 0 + // we're using relocation type IMAGE_REL_BASED_ABSOLUTE which is ignored #define IMAGE_REL_ABSOLUTE 0 - .section .reloc - .long dummy // Page RVA - .long 10 // Block Size (2*4+2) - .word (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy + .section .reloc + .long 0 // Page RVA + .long 12 // Block Size (2*4+2*2) + .word (IMAGE_REL_ABSOLUTE<<12) + 0 + .word (IMAGE_REL_ABSOLUTE<<12) + 0