diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-06-22 20:06:58 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-06-26 23:43:19 +0200 |
commit | e1bbf6be9049319fefa0d30267433d4921e4f5a1 (patch) | |
tree | 0eea4279d8628ecfa0c2623a5f5c2a576747fb3b /arch | |
parent | 22159db6b06bc17a19560a63bb40c05368ccfa8c (diff) | |
download | barebox-e1bbf6be9049319fefa0d30267433d4921e4f5a1.tar.gz barebox-e1bbf6be9049319fefa0d30267433d4921e4f5a1.tar.xz |
ARM: Add image end section
In the upcoming multi image build process we will cat images together.
To find the concatenated image we need to reliably find the end of the
current binary. This adds a dummy section at the end of a pbl binary.
Its only purpose is to mark the end of the image. The multi image
patches will add something to this section so that it doesn't get
discarded by the linker.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/lib/pbl.lds.S | 8 | ||||
-rw-r--r-- | arch/arm/lib/runtime-offset.S | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/lib/pbl.lds.S b/arch/arm/lib/pbl.lds.S index d3ec2f86a1..1eae8298ee 100644 --- a/arch/arm/lib/pbl.lds.S +++ b/arch/arm/lib/pbl.lds.S @@ -86,6 +86,12 @@ SECTIONS } __piggydata_end = .; - _barebox_image_size = __piggydata_end - (TEXT_BASE - SZ_2M); + . = ALIGN(4); + .image_end : { + KEEP(*(.image_end)) + } + __image_end = .; + + _barebox_image_size = __image_end - (TEXT_BASE - SZ_2M); _barebox_pbl_size = __bss_start - (TEXT_BASE - SZ_2M); } diff --git a/arch/arm/lib/runtime-offset.S b/arch/arm/lib/runtime-offset.S index 15bf4149b7..f10c4c8469 100644 --- a/arch/arm/lib/runtime-offset.S +++ b/arch/arm/lib/runtime-offset.S @@ -42,6 +42,9 @@ ld_var_entry __dynsym_end ld_var_entry _barebox_image_size ld_var_entry __bss_start ld_var_entry __bss_stop +#ifdef __PBL__ +ld_var_entry __image_end +#endif 1: ldr r1, =__ld_var_base |