* [PATCH 1/2] ARM: pbl: keep __image_end section
@ 2019-11-01 19:53 Lucas Stach
2019-11-01 19:53 ` [PATCH 2/2] ARM: force TEXT_BASE to zero only for relocatable build Lucas Stach
2019-11-04 8:56 ` [PATCH 1/2] ARM: pbl: keep __image_end section Sascha Hauer
0 siblings, 2 replies; 4+ messages in thread
From: Lucas Stach @ 2019-11-01 19:53 UTC (permalink / raw)
To: barebox
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.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
arch/arm/lib/pbl.lds.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/lib/pbl.lds.S b/arch/arm/lib/pbl.lds.S
index 01ed38449523..b593d0329a7b 100644
--- a/arch/arm/lib/pbl.lds.S
+++ b/arch/arm/lib/pbl.lds.S
@@ -114,7 +114,7 @@ SECTIONS
}
__piggydata_end = .;
- .image_end : { *(.__image_end) }
+ .image_end : { KEEP(*(.__image_end)) }
pbl_image_size = . - BASE;
--
2.23.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] ARM: force TEXT_BASE to zero only for relocatable build
2019-11-01 19:53 [PATCH 1/2] ARM: pbl: keep __image_end section Lucas Stach
@ 2019-11-01 19:53 ` Lucas Stach
2019-11-04 8:56 ` Sascha Hauer
2019-11-04 8:56 ` [PATCH 1/2] ARM: pbl: keep __image_end section Sascha Hauer
1 sibling, 1 reply; 4+ messages in thread
From: Lucas Stach @ 2019-11-01 19:53 UTC (permalink / raw)
To: barebox
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.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
arch/arm/Kconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 652ac24ce3fa..f4e943a8fd8a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -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"
--
2.23.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] ARM: force TEXT_BASE to zero only for relocatable build
2019-11-01 19:53 ` [PATCH 2/2] ARM: force TEXT_BASE to zero only for relocatable build Lucas Stach
@ 2019-11-04 8:56 ` Sascha Hauer
0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2019-11-04 8:56 UTC (permalink / raw)
To: Lucas Stach; +Cc: barebox
On Fri, Nov 01, 2019 at 08:53:38PM +0100, Lucas Stach wrote:
> 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.
>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
> arch/arm/Kconfig | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 652ac24ce3fa..f4e943a8fd8a 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -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
--
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] ARM: pbl: keep __image_end section
2019-11-01 19:53 [PATCH 1/2] ARM: pbl: keep __image_end section Lucas Stach
2019-11-01 19:53 ` [PATCH 2/2] ARM: force TEXT_BASE to zero only for relocatable build Lucas Stach
@ 2019-11-04 8:56 ` Sascha Hauer
1 sibling, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2019-11-04 8:56 UTC (permalink / raw)
To: Lucas Stach; +Cc: barebox
On Fri, Nov 01, 2019 at 08:53:37PM +0100, Lucas Stach wrote:
> 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.
>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
> arch/arm/lib/pbl.lds.S | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied (this one), thanks
Sascha
--
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-11-04 8:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-01 19:53 [PATCH 1/2] ARM: pbl: keep __image_end section Lucas Stach
2019-11-01 19:53 ` [PATCH 2/2] ARM: force TEXT_BASE to zero only for relocatable build Lucas Stach
2019-11-04 8:56 ` Sascha Hauer
2019-11-04 8:56 ` [PATCH 1/2] ARM: pbl: keep __image_end section Sascha Hauer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.