
8 Jan
2023
8 Jan
'23
6:20 p.m.
On 1/8/23 15:19, Heinrich Schuchardt wrote:
When adding
const unsigned short *menu_items[] = { u"abc\n", u"def\n", NULL };
to helloworld.c outside of a function and then referring to the variable in a function the pointer the reference is incorrect. This is due to not considering the generated relocations.
Fix the linker script and the PE-COFF header.
Fixes: c65d76ed5f81 ("efi: arm: Add aarch64 EFI app support") Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
Debugging shows that function _relocate() finds a pointer to .rela.data and then uses this for the self relocation.
Do this .rela.data should not be in .reloc but in .text.
Best regards
Heinrich