
19 Jan
2019
19 Jan
'19
12:55 p.m.
On 1/19/19 11:21 AM, Heinrich Schuchardt wrote:
Hello Alex,
bootefi hello fails since 5be444d14b380b210b246aa73dd5a111e4b1f80d efi_loader: consistent build flags for EFI applications
The problem is caused by incorrect entry point information in the EFI binary:
Actual positions in EFI file: 0x178 hw_memcmp.constprop.0 0x1a8 efi_main
Header information in EFI file (using https://github.com/xypron/efi_analyzer):
BaseOfCode=0x148 AddressOfEntryPoint=0x148
So AddressOfEntryPoint is not pointing to efi_main().
In arch/arm/lib/crt0_aarch64_efi.S we define AddressOfEntryPoint to point to _start. _start() calls _relocate().
We already do a relocation in efi_load_pe(). I cannot understand why the code should be relocated twice.
Best regards
Heinrich