[PATCH v2 04/13] ARM: lds: Add SoC specific sections to go before .text_head_prologue

Ahmad Fatoum a.fatoum at pengutronix.de
Wed May 31 23:34:21 PDT 2023


On 25.05.23 01:43, Jules Maselbas wrote:
> On sunxi platforms the boot rom (BROM) looks for a specific header which
> will also be loaded in memory, causing pbl, or barebox, image not loaded
> at the expected BASE addresse. This also cause an issue with relocatable
> pbl: instruction used for relocation expect the image to be aligned on a
> 4K page boundary.
> 
> The proposed solution here is to allow to soc specific section to be put
> in the very begging of the .text section, before anything else.
> 
> Signed-off-by: Jules Maselbas <jmaselbas at zdiv.net>
> ---
> rfc->v2:
>  - fix typo in commit title
>  - replace the use of macro with SORT_BY_NAME(.text_head_soc_header*)
> 
>  arch/arm/lib/pbl.lds.S | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/lib/pbl.lds.S b/arch/arm/lib/pbl.lds.S
> index 114ec7bc81..059909806e 100644
> --- a/arch/arm/lib/pbl.lds.S
> +++ b/arch/arm/lib/pbl.lds.S
> @@ -27,6 +27,7 @@ SECTIONS
>  	.text      :
>  	{
>  		_stext = .;
> +		*(SORT_BY_NAME(.text_head_soc_header*))

You shouldn't need SORT_BY_NAME here, because they should be just one.

>  		*(.text_head_prologue*)
>  		*(.text_head_entry*)
>  		__bare_init_start = .;

-- 
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