diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2012-04-19 14:58:33 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2012-04-26 11:36:34 +0100 |
commit | 541766ca7430f4708b3b24fde7dd712dd08c8baf (patch) | |
tree | c830827ad9c7d78778cef01b0f93cc41d996d1b4 /model.lds.S | |
parent | 3c3dfa372d6c5286f91fe7aa82fbc5066757f8e1 (diff) |
bootwrapper: Switch to C semihosting code
Switch over to the C semihosting code, removing the old assembly
implementation. This allows us to simplify the build process
somewhat: boot.S is now compiled only once, rather than once for
semihosting and once without.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'model.lds.S')
-rw-r--r-- | model.lds.S | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/model.lds.S b/model.lds.S index e6bf960..07fae8c 100644 --- a/model.lds.S +++ b/model.lds.S @@ -22,36 +22,40 @@ INPUT(./uImage) PHYS_OFFSET = 0x80000000; MON_OFFSET = 0xf0000000; - - +STACKTOP = 0xff000000; SECTIONS { . = PHYS_OFFSET; -#ifdef SEMIHOSTING - .text : { bootsemi.o } -#else - .text : { boot.o } -#endif - . = PHYS_OFFSET + 0x8000 - 0x40; - kernel = . + 0x40; + + kernel_start = .; + kernel_entry = . + 0x40; #ifndef SEMIHOSTING .kernel : { ./uImage } #endif + kernel_end = .; . = PHYS_OFFSET + 0x00d00000; - filesystem = .; + fs_start = .; #if defined(USE_INITRD) && !defined(SEMIHOSTING) .filesystem : { ./filesystem.cpio.gz } - fs_size = . - filesystem; #endif + fs_end = .; - .data : { *(.data) } - .bss : { *(.bss) } . = MON_OFFSET; .monitor : { monitor.o } + + /* Put most of the actual boot loader code up in high memory + * where it won't get overwritten by kernel, initrd or atags. + */ + .text : { *(.text) } + .data : { *(.data) } + .bss : { *(.bss) } + + . = STACKTOP; + stacktop = .; } |