[RFC PATCH 08/10] arm: efi_loader: move .dynamic out of .text in EFI

Ilias Apalodimas ilias.apalodimas at linaro.org
Mon May 22 09:30:32 CEST 2023


Hi Sam,

On Sat, 20 May 2023 at 23:56, Sam Edwards <cfsworks at gmail.com> wrote:
>
> This is not proper: A .text section is SHT_PROGBITS,
> while the .dynamic section is SHT_DYNAMIC. Attempting to
> combine them like this creates a section type mismatch.
>
> It does seem that GNU ld does not complain, but LLVM's lld
> considers this an error.
>
> Signed-off-by: Sam Edwards <CFSworks at gmail.com>
> Cc: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
>
>  arch/arm/lib/elf_aarch64_efi.lds | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/arm/lib/elf_aarch64_efi.lds b/arch/arm/lib/elf_aarch64_efi.lds
> index 5dd9809169..986f13936d 100644
> --- a/arch/arm/lib/elf_aarch64_efi.lds
> +++ b/arch/arm/lib/elf_aarch64_efi.lds
> @@ -24,10 +24,9 @@ SECTIONS
>                 *(.gnu.linkonce.t.*)
>                 *(.srodata)
>                 *(.rodata*)
> -               . = ALIGN(16);
> -               *(.dynamic);
>                 . = ALIGN(512);
>         }
> +       .dynamic : { *(.dynamic) }
This looks correct.  However, this changed recently on commit
d7ddeb66a6ce ("efi_loader: fix building aarch64 EFI binaries").

Heinrich any chance you can repeat your tests?

Thanks
/Ilias
>         .rela.dyn : { *(.rela.dyn) }
>         .rela.plt : { *(.rela.plt) }
>         .rela.got : { *(.rela.got) }
> --
> 2.39.2
>


More information about the U-Boot mailing list