diff mbox series

u-boot-elf.lds: mark executable

Message ID 20241114170356.3248124-1-caleb.connolly@linaro.org
State New
Headers show
Series u-boot-elf.lds: mark executable | expand

Commit Message

Caleb Connolly Nov. 14, 2024, 5:03 p.m. UTC
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.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
---
 arch/u-boot-elf.lds | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Tom Rini Nov. 22, 2024, 8:50 p.m. UTC | #1
On Thu, Nov 14, 2024 at 06:03:53PM +0100, Caleb Connolly wrote:

> 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.
> 
> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
> ---
>  arch/u-boot-elf.lds | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/u-boot-elf.lds b/arch/u-boot-elf.lds
> index 1666027e3635..eb84a22dd71b 100644
> --- a/arch/u-boot-elf.lds
> +++ b/arch/u-boot-elf.lds
> @@ -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
diff mbox series

Patch

diff --git a/arch/u-boot-elf.lds b/arch/u-boot-elf.lds
index 1666027e3635..eb84a22dd71b 100644
--- a/arch/u-boot-elf.lds
+++ b/arch/u-boot-elf.lds
@@ -1,5 +1,9 @@ 
 ENTRY(CONFIG_PLATFORM_ELFENTRY)
+PHDRS
+{
+	data PT_LOAD FLAGS(7);
+}
 SECTIONS
 {
 	. = CONFIG_PLATFORM_ELFENTRY;