[PATCH v2 2/2] efi_loader: fix building aarch64 EFI binaries
Ilias Apalodimas
ilias.apalodimas at linaro.org
Wed Jan 4 13:01:16 CET 2023
Hi Heinrich
> + .short 0 /* NumberOfRelocations */
> + .short 0 /* NumberOfLineNumbers */
> + .long 0xc0000040 /* Characteristics (section flags) */
You probably forgot to remove this line
> + /* Characteristics (section flags) */
> + .long (IMAGE_SCN_MEM_WRITE | \
> + IMAGE_SCN_MEM_READ | \
> + IMAGE_SCN_CNT_INITIALIZED_DATA)
>
> - .align 9
> + .align 12
> _start:
> stp x29, x30, [sp, #-32]!
> mov x29, sp
> diff --git a/arch/arm/lib/elf_aarch64_efi.lds b/arch/arm/lib/elf_aarch64_efi.lds
> index c0604dad46..ffc6f6e604 100644
> --- a/arch/arm/lib/elf_aarch64_efi.lds
> +++ b/arch/arm/lib/elf_aarch64_efi.lds
> @@ -18,11 +18,13 @@ SECTIONS
> *(.gnu.linkonce.t.*)
> *(.srodata)
> *(.rodata*)
> + . = ALIGN(16);
> + *(.dynamic);
> . = ALIGN(512);
> }
> _etext = .;
> _text_size = . - _text;
> - .dynamic : { *(.dynamic) }
> + . = ALIGN(4096);
> .data : {
> _data = .;
> *(.sdata)
> @@ -48,11 +50,11 @@ SECTIONS
> _bss_end = .;
> _edata = .;
> }
> + _data_size = _edata - _data;
> .rela.dyn : { *(.rela.dyn) }
> .rela.plt : { *(.rela.plt) }
> .rela.got : { *(.rela.got) }
> .rela.data : { *(.rela.data) *(.rela.data*) }
> - _data_size = . - _etext;
>
> . = ALIGN(4096);
> .dynsym : { *(.dynsym) }
> --
> 2.37.2
>
with that fix
Reviewed-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
More information about the U-Boot
mailing list