[PATCH 18/19] riscv: linker script: create separate PT_LOAD segments for text, rodata, and data

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Jan 5 05:40:20 PST 2026


Hi,

On 1/5/26 12:26 PM, Sascha Hauer wrote:
> -	if (dyns == NULL)
> -		die("No dynamic section found");
> +	if (dyns == NULL) {
> +		/* No PT_DYNAMIC segment found - binary may not need prelinking.
> +		 * This can happen with statically-linked relocatable binaries
> +		 * that handle relocations differently. Exit successfully.
> +		 */
> +		return;
> +	}

We use the script only for barebox and we can't do without relocations
there. Is there a particular reason for think hunk or can it be dropped?

Thanks,
Ahmad

-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |




More information about the barebox mailing list