diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2017-02-06 11:18:07 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-02-08 12:03:20 +0100 |
commit | 857f69ba8c66e3b4834bcaafd373a83043629326 (patch) | |
tree | 9f72ddcb01875d0ed9d46f74dc6c90e05ba50171 /arch/arm/lib32 | |
parent | f7165017f41fab86c1dd97e40de2355fc64dde2f (diff) | |
download | barebox-857f69ba8c66e3b4834bcaafd373a83043629326.tar.gz barebox-857f69ba8c66e3b4834bcaafd373a83043629326.tar.xz |
ARM: start: Fix image size calculation
In barebox_non_pbl_start() we do not run at the address we are linked
at, so we must read linker variables using ld_var(). Since ld_var()
current is not available on arm64 we create two zero sized arrays,
one at the begin of the image and one at the end. The difference
between both is the image size we are looking for.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/lib32')
-rw-r--r-- | arch/arm/lib32/barebox.lds.S | 2 | ||||
-rw-r--r-- | arch/arm/lib32/runtime-offset.S | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/lib32/barebox.lds.S b/arch/arm/lib32/barebox.lds.S index 6dc8bd2f3c..5fd39dc66c 100644 --- a/arch/arm/lib32/barebox.lds.S +++ b/arch/arm/lib32/barebox.lds.S @@ -30,6 +30,7 @@ SECTIONS #else . = TEXT_BASE; #endif + .image_start : { *(.__image_start) } #ifndef CONFIG_PBL_IMAGE PRE_IMAGE @@ -116,6 +117,7 @@ SECTIONS } _edata = .; + .image_end : { *(.__image_end) } . = ALIGN(4); __bss_start = .; diff --git a/arch/arm/lib32/runtime-offset.S b/arch/arm/lib32/runtime-offset.S index f10c4c8469..7375cb961b 100644 --- a/arch/arm/lib32/runtime-offset.S +++ b/arch/arm/lib32/runtime-offset.S @@ -39,7 +39,6 @@ ld_var_entry __rel_dyn_start ld_var_entry __rel_dyn_end ld_var_entry __dynsym_start ld_var_entry __dynsym_end -ld_var_entry _barebox_image_size ld_var_entry __bss_start ld_var_entry __bss_stop #ifdef __PBL__ |