[PATCH 4/6] arm: introduce barebox_bare_init_size to known the bare_init size
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Tue Jan 3 00:00:48 EST 2012
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
arch/arm/include/asm/sections.h | 6 ++++++
arch/arm/lib/barebox.lds.S | 3 +++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/arch/arm/include/asm/sections.h b/arch/arm/include/asm/sections.h
index 2b8c516..5a11aad 100644
--- a/arch/arm/include/asm/sections.h
+++ b/arch/arm/include/asm/sections.h
@@ -1 +1,7 @@
#include <asm-generic/sections.h>
+
+extern char __bare_init_start[], __bare_init_end[];
+
+extern void *_barebox_bare_init_size;
+
+#define barebox_bare_init_size (unsigned int)&_barebox_bare_init_size
diff --git a/arch/arm/lib/barebox.lds.S b/arch/arm/lib/barebox.lds.S
index f05f345..defcb18 100644
--- a/arch/arm/lib/barebox.lds.S
+++ b/arch/arm/lib/barebox.lds.S
@@ -44,9 +44,12 @@ SECTIONS
. = 0x1000;
LONG(0x53555243) /* 'CRUS' */
#endif
+ __bare_init_start = .;
*(.text_bare_init*)
+ __bare_init_end = .;
*(.text*)
}
+ _barebox_bare_init_size = __bare_init_end - _text;
. = ALIGN(4);
.rodata : { *(.rodata*) }
--
1.7.7
More information about the barebox
mailing list