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>
This commit is contained in:
parent
22159db6b0
commit
e1bbf6be90
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -6,6 +6,7 @@ extern char __bss_start[], __bss_stop[];
|
|||
extern char _sdata[], _edata[];
|
||||
extern char __bare_init_start[], __bare_init_end[];
|
||||
extern char _end[];
|
||||
extern char __image_end[];
|
||||
extern void *_barebox_image_size;
|
||||
extern void *_barebox_bare_init_size;
|
||||
extern void *_barebox_pbl_size;
|
||||
|
|
Loading…
Reference in New Issue