diff options
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libbsp/arm/armulator/startup/linkcmds | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/arm/armulator/startup/linkcmds b/c/src/lib/libbsp/arm/armulator/startup/linkcmds new file mode 100644 index 0000000000..d6b6e5f6a5 --- /dev/null +++ b/c/src/lib/libbsp/arm/armulator/startup/linkcmds @@ -0,0 +1,61 @@ +/* + * $Id$ + */ + +/* + * Declare some sizes. + */ +_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0; +_RamSize = DEFINED(_RamSize) ? _RamSize : 1M; +_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000; +_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000; + +SECTIONS +{ + . = 0x8000; + .text : + { + CREATE_OBJECT_SYMBOLS + *(.text) + _etext = .; + + ___CTOR_LIST__ = .; + LONG((___CTOR_END__ - ___CTOR_LIST__) / 4 - 2) + *(.ctors) + LONG(0) + ___CTOR_END__ = .; + ___DTOR_LIST__ = .; + LONG((___DTOR_END__ - ___DTOR_LIST__) / 4 - 2) + *(.dtors) + LONG(0) + ___DTOR_END__ = .; + } + . = ALIGN(256) + (. & (256 - 1)); + .data : + { + *(.data) + CONSTRUCTORS + _edata = .; + } + .bss SIZEOF(.data) + ADDR(.data): + { + _bss_start = .; + _clear_start = .; + *(.bss) + *(COMMON) + . = ALIGN (64); + _stack_init = .; + . += _StackSize; + _clear_end = .; + _WorkspaceBase = .; + . += 512K; /* reserve some memory for workspace */ + _HeapBase = .; + . += _HeapSize; /* reserve some memory for heap */ + _end = .; + __end = .; + } +} + +HeapBase = _HeapBase; +HeapSize = _HeapSize; +WorkspaceBase = _WorkspaceBase; |