Skip to contentSkip to conversation

u-boot-elf.lds: mark executable

PATCH In review Caleb Connolly 2 participants 2 messages Nov 14, 2024 – Nov 22, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 u-boot-elf.lds: mark executable

Some pre-loaders/bootROMs like those on Qualcomm platforms actually use the ELF format and respect the headers. Mark U-Boot as executable so we can actually run it on these boards.

---
 arch/u-boot-elf.lds | 4 ++++
 1 file changed, 4 insertions(+)
arch/u-boot-elf.lds +4 -0
index 1666027e3635..eb84a22dd71b 100644
@@ -1,5 +1,9 @@
 ENTRY(CONFIG_PLATFORM_ELFENTRY)
+PHDRS
+{
+	data PT_LOAD FLAGS(7);
+}
 SECTIONS
 {
 	. = CONFIG_PLATFORM_ELFENTRY;
 
Signature · 1 line
2.47.0
#1 lore raw
Quoted 14 lines · Caleb Connolly

Some pre-loaders/bootROMs like those on Qualcomm platforms actually use the ELF format and respect the headers. Mark U-Boot as executable so we can actually run it on these boards.

---
 arch/u-boot-elf.lds | 4 ++++
 1 file changed, 4 insertions(+)
arch/u-boot-elf.lds +0 -0
index 1666027e3635..eb84a22dd71b 100644

arch/u-boot-elf.lds line 9

Quoted 9 lines
arch/u-boot-elf.lds +4 -0
@@ -1,5 +1,9 @@
 ENTRY(CONFIG_PLATFORM_ELFENTRY)
+PHDRS
+{
+	data PT_LOAD FLAGS(7);
+}
 SECTIONS
 {
 	. = CONFIG_PLATFORM_ELFENTRY;
 

This leads to thunderx_88xx and many others failing with:
aarch64-linux-ld.bfd: no sections assigned to phdrs

Signature · 1 line
Tom