ARM: pbl: keep __image_end section
PATCH 1/2 ARM: pbl: keep __image_end section
Not all architectures are referencing the image_end section from code, in which case the linker is free to drop the section, which then messes up the calculation of the _barebox_image_size linker variable.
--- arch/arm/lib/pbl.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/lib/pbl.lds.S +1 -1
@@ -114,7 +114,7 @@ SECTIONS } __piggydata_end = .; - .image_end : { *(.__image_end) } + .image_end : { KEEP(*(.__image_end)) } pbl_image_size = . - BASE;
Signature · 7 lines
2.23.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/2 ARM: force TEXT_BASE to zero only for relocatable build
Commit 2a94e821ba2e (ARM: For relocatable image force TEXT_BASE 0x0) intended to force the TEXT_BASE to zero for relocatable images, but the change added the Kconfig symbol overriding the TEXT_BASE unconditionally. This breaks non-relocatable images.
--- arch/arm/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/Kconfig +2 -0
@@ -19,9 +19,11 @@ config ARM_USE_COMPRESSED_DTB select UNCOMPRESS select LZO_DECOMPRESS +if RELOCATABLE config TEXT_BASE hex default 0x0 +endif menu "System Type"
Signature · 7 lines
2.23.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 2/2] ARM: force TEXT_BASE to zero only for relocatable build
Quoted 15 lines · Lucas Stach
Commit
2a94e821ba2e(ARM: For relocatable image forceTEXT_BASE0x0) intended to force theTEXT_BASEto zero for relocatable images, but the change added theKconfigsymbol overriding theTEXT_BASEunconditionally. This breaks non-relocatable images.Signed-off-by Lucas Stach <[email protected]>--- arch/arm/Kconfig | 2 ++ 1 file changed, 2 insertions(+)arch/arm/Kconfig +0
-0
arch/arm/Kconfig config ARM_USE_COMPRESSED_DTB · line 26
Quoted 8 lines
arch/arm/Kconfig +2
-0@@ -19,9 +19,11 @@ config ARM_USE_COMPRESSED_DTB select UNCOMPRESS select LZO_DECOMPRESS +if RELOCATABLE config TEXT_BASE hex default 0x0 +endif
Does this really fix something? For example in the freescale-mx21-ads_defconfig we have CONFIG_TEXT_BASE=0xc3000000 which is still shown in Kconfig and barebox is correctly built with that TEXT_BASE. Yes, without this patch we have a duplicate symbol in Kconfig with concurrent default values, but the files seem to be sourced in the right order.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 9 lines · Lucas Stach
Not all architectures are referencing the
image_endsection from code, in which case the linker is free to drop the section, which then messes up the calculation of the_barebox_image_sizelinker variable.Signed-off-by Lucas Stach <[email protected]>--- arch/arm/lib/pbl.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied (this one), thanks
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox