[RFC PATCH 08/10] arm: efi_loader: move .dynamic out of .text in EFI
Sam Edwards
cfsworks at gmail.com
Mon May 22 19:13:27 CEST 2023
On 5/22/23 02:10, Heinrich Schuchardt wrote:
Hi Heinrich,
> .dynamic should be aligned. Structure Elf64_Dyn requires at least 8 byte
> alignment.
As best as I can tell, linkers (certainly lld[1], apparently also GNU ld
judging by its default linker scripts) themselves set the proper word
alignment on the .dynamic section that they synthesize for their
internal input object. That alignment requirement bubbles up to the
output section, so explicit alignment here should not be necessary.
> The symbol _etext below should be 512 aligned as in
> arch/arm/lib/crt0_aarch64_efi.S we have set FileAlignment = 0x200.
Ah, that definitely needs to be fixed since the .rela.* sections might
not have the 512 alignment. I've updated my local branch, though this
also needs to be addressed in the current master branch.
Cheers,
Sam
[1]:
https://github.com/llvm/llvm-project/blob/acce2a315945e386a7be6f014ebe90c2a28f38d9/lld/ELF/SyntheticSections.cpp#L1246
More information about the U-Boot
mailing list