flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
pfranz 22 Mar 2018, 15:00
I am trying to run .efi files in my Shell v2.2 on EFI 2.13. I boot the EFI shell, and some files run, some others report a load error like "command status: load error.
For example, this works: Code: format pe64 efi entry main include 'uefi.inc' main: mov [efi_ptr],rdx uefi_call_wrapper ConOut, OutputString, ConOut, _hello mov qword [uefi_rsptmp],rsp and esp, 0xfffffff0 sub rsp, 4*8 ; reserve space for 4 arguments lea rdx, [_hello2] mov rcx, [efi_ptr] mov rcx, [rcx + EFI_SYSTEM_TABLE.ConOut] call [rcx + SIMPLE_TEXT_OUTPUT_INTERFACE.OutputString] mov qword rsp,[uefi_rsptmp] exit: mov eax, EFI_SUCCESS retn section '.data' data readable writeable _hello du 'Hello World',13,10,0 _hello2 du 'Hello World 2',13,10,'(From EFI app written in FASM)',13,10,0 section '.reloc' fixups data discardable I attach the file "uefi.inc" edit by revolution: Added code tags
|
|||||||||||
![]() |
|
pfranz 23 Mar 2018, 05:40
uefi version is 2.31 not 2.13
|
|||
![]() |
|
pfranz 24 Mar 2018, 12:09
tried fasm 1.71.34, same behaviour
|
|||
![]() |
|
Tomasz Grysztar 24 Mar 2018, 17:35
Isn't it simply a problem with an empty .reloc section. You may try one of the simple workarounds posted previously.
|
|||
![]() |
|
pfranz 24 Mar 2018, 21:07
thanks, it works.Still I d suggest you insert this workaround with a warning in fasm, as it is not a windows problem only
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.