diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2008-08-12 17:10:49 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2008-08-13 16:52:14 +0200 |
commit | bbee767a014d7f9e7bd2df90148976fb5dd87a3f (patch) | |
tree | 8dc813b3bac700cd21f3b496449375f14917149a | |
parent | e90e319aebbdcc1667abb52ab7d4193ba538c7d9 (diff) | |
download | barebox-bbee767a014d7f9e7bd2df90148976fb5dd87a3f.tar.gz barebox-bbee767a014d7f9e7bd2df90148976fb5dd87a3f.tar.xz |
init: add section for early code
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | arch/arm/lib/u-boot.lds.S | 1 | ||||
-rw-r--r-- | include/init.h | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/lib/u-boot.lds.S b/arch/arm/lib/u-boot.lds.S index 1ea8be1e9f..fe844421d7 100644 --- a/arch/arm/lib/u-boot.lds.S +++ b/arch/arm/lib/u-boot.lds.S @@ -37,6 +37,7 @@ SECTIONS _stext = .; _text = .; *(.text_entry*) + *(.text_bare_init*) *(.text*) } diff --git a/include/init.h b/include/init.h index 44b4e3b151..6ddca921eb 100644 --- a/include/init.h +++ b/include/init.h @@ -15,5 +15,14 @@ typedef int (*initcall_t)(void); #define device_initcall(fn) __define_initcall("5",fn,5) #define late_initcall(fn) __define_initcall("6",fn,6) +/* section for code used very early when + * - we're not running from where we linked at + * - bss not cleared + * - static variables not initialized + * + * Mainly useful for booting from NAND Controllers + */ +#define __bare_init __section(.text_bare_init.text) + #endif /* _INIT_H */ |