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 <[email protected]>

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

Reply via email to