diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-01-17 11:07:25 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-01-23 08:15:43 +0100 |
commit | 53f7c5ccaf07683be12d40b4fcac0fd04c091943 (patch) | |
tree | e8e61597e48b663a1b330aa7a801ca077bff397a /arch/arm/lib | |
parent | a1aa3d96de9c7f15a3fed2cf41d1eda7bdae2047 (diff) | |
download | barebox-53f7c5ccaf07683be12d40b4fcac0fd04c091943.tar.gz barebox-53f7c5ccaf07683be12d40b4fcac0fd04c091943.tar.xz |
ARM: Fix image size calculation for CONFIG_PBL_RELOCATABLE
TEXT_BASE - SZ_2M is only used for non relocable pbl images.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/lib')
-rw-r--r-- | arch/arm/lib/pbl.lds.S | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/arm/lib/pbl.lds.S b/arch/arm/lib/pbl.lds.S index 1eae8298ee..0954c89ce4 100644 --- a/arch/arm/lib/pbl.lds.S +++ b/arch/arm/lib/pbl.lds.S @@ -24,15 +24,17 @@ #include <asm-generic/barebox.lds.h> #include <asm-generic/memory_layout.h> +#ifdef CONFIG_PBL_RELOCATABLE +#define BASE 0x0 +#else +#define BASE (TEXT_BASE - SZ_2M) +#endif + OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") OUTPUT_ARCH(arm) SECTIONS { -#ifdef CONFIG_PBL_RELOCATABLE - . = 0x0; -#else - . = TEXT_BASE - SZ_2M; -#endif + . = BASE; PRE_IMAGE @@ -91,7 +93,6 @@ SECTIONS KEEP(*(.image_end)) } __image_end = .; - - _barebox_image_size = __image_end - (TEXT_BASE - SZ_2M); - _barebox_pbl_size = __bss_start - (TEXT_BASE - SZ_2M); + _barebox_image_size = __image_end - BASE; + _barebox_pbl_size = __bss_start - BASE; } |