[RFC PATCH 08/10] arm: efi_loader: move .dynamic out of .text in EFI
Sam Edwards
cfsworks at gmail.com
Sat May 20 22:55:45 CEST 2023
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) }
.rela.dyn : { *(.rela.dyn) }
.rela.plt : { *(.rela.plt) }
.rela.got : { *(.rela.got) }
--
2.39.2
More information about the U-Boot
mailing list