summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/mcf5329/startup/linkcmds
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-06-20 14:58:34 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-06-20 14:58:34 +0000
commit6b56ec3327a541aa711116d8bb37e22ede976dd6 (patch)
tree4a2655f3db869a052e17923f76ee3207c7b7f7d6 /c/src/lib/libbsp/m68k/mcf5329/startup/linkcmds
parent2008-06-19 Matthew Riek <matthew.riek@ibiscomputer.com.au> (diff)
downloadrtems-6b56ec3327a541aa711116d8bb37e22ede976dd6.tar.bz2
2008-06-20 Matthew Riek <matthew.riek@ibiscomputer.com.au>
* ChangeLog, Makefile.am, README, bsp_specs, configure.ac, gdb-init, preinstall.am, clock/clock.c, console/console.c, include/bsp.h, include/bspopts.h.in, include/coverhd.h, include/tm27.h, network/network.c, start/start.S, startup/bspclean.c, startup/bspstart.c, startup/cfinit.c, startup/init5329.c, startup/linkcmds, startup/linkcmdsflash, timer/timer.c: New files.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/m68k/mcf5329/startup/linkcmds186
-rw-r--r--c/src/lib/libbsp/m68k/mcf5329/startup/linkcmdsflash182
2 files changed, 368 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/m68k/mcf5329/startup/linkcmds b/c/src/lib/libbsp/m68k/mcf5329/startup/linkcmds
new file mode 100644
index 0000000000..f115d44cc0
--- /dev/null
+++ b/c/src/lib/libbsp/m68k/mcf5329/startup/linkcmds
@@ -0,0 +1,186 @@
+/*
+ * This file contains directives for the GNU linker which are specific
+ * to the Freescale ColdFire mcf52235
+ *
+ * COPYRIGHT (c) 1989-1999.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.e
+ *
+ * $Id$
+ */
+
+/*
+ * Declare some sizes.
+ */
+_CoreSRamBase = DEFINED(_RamBase) ? _RamBase : 0x80000000;
+_CoreSRamSize = DEFINED(_RamSize) ? _RamSize : 32K;
+
+_RamBase = DEFINED(_RamBase) ? _RamBase : 0x40000000;
+_RamSize = DEFINED(_RamSize) ? _RamSize : 32M;
+
+_BootFlashBase = DEFINED(_FlashBase) ? _FlashBase : 0x00000000;
+_BootFlashSize = DEFINED(_FlashBase) ? _FlashBase : 2M;
+
+_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0;
+_StackSize = DEFINED(_StackSize) ? _StackSize : 0x400;
+
+_VBR = 0x40000000;
+
+ENTRY(start)
+
+MEMORY
+{
+ core_sram : ORIGIN = 0x80000000, LENGTH = 32K
+ boot_flash : ORIGIN = 0x00000000, LENGTH = 2M
+ dram : ORIGIN = 0x40000000, LENGTH = 32M
+}
+
+SECTIONS
+{
+ .ram_code :
+ {
+ *(.ram_code)
+ } > core_sram
+
+ /*
+ * Text, data and bss segments
+ */
+ .text 0x40000500 : {
+
+ *(.text*)
+
+ /*
+ * C++ constructors/destructors
+ */
+ *(.gnu.linkonce.t.*)
+
+ /*
+ * Initialization and finalization code.
+ *
+ * Various files can provide initialization and finalization
+ * functions. crtbegin.o and crtend.o are two instances. The
+ * body of these functions are in .init and .fini sections. We
+ * accumulate the bodies here, and prepend function prologues
+ * from crti.o and function epilogues from crtn.o. crti.o must
+ * be linked first; crtn.o must be linked last. Because these
+ * are wildcards, it doesn't matter if the user does not
+ * actually link against crti.o and crtn.o; the linker won't
+ * look for a file to match a wildcard. The wildcard also
+ * means that it doesn't matter which directory crti.o and
+ * crtn.o are in.
+ */
+ PROVIDE (_init = .);
+ *crti.o(.init)
+ *(.init)
+ *crtn.o(.init)
+ PROVIDE (_fini = .);
+ *crti.o(.fini)
+ *(.fini)
+ *crtn.o(.fini)
+
+ /*
+ * Special FreeBSD sysctl sections.
+ */
+ . = ALIGN (16);
+ __start_set_sysctl_set = .;
+ *(set_sysctl_*);
+ __stop_set_sysctl_set = ABSOLUTE(.);
+ *(set_domain_*);
+ *(set_pseudo_*);
+
+ /*
+ * C++ constructors/destructors
+ *
+ * gcc uses crtbegin.o to find the start of the constructors
+ * and destructors so we make sure it is first. Because this
+ * is a wildcard, it doesn't matter if the user does not
+ * actually link against crtbegin.o; the linker won't look for
+ * a file to match a wildcard. The wildcard also means that
+ * it doesn't matter which directory crtbegin.o is in. The
+ * constructor and destructor list are terminated in
+ * crtend.o. The same comments apply to it.
+ */
+ . = ALIGN (16);
+ *crtbegin.o(.ctors)
+ *(.ctors)
+ *crtend.o(.ctors)
+ *crtbegin.o(.dtors)
+ *(.dtors)
+ *crtend.o(.dtors)
+
+ /*
+ * Exception frame info
+ */
+ . = ALIGN (16);
+ *(.eh_frame)
+
+ /*
+ * Read-only data
+ */
+ . = ALIGN (16);
+ _rodata_start = . ;
+ *(.rodata*)
+ *(.gnu.linkonce.r*)
+
+ . = ALIGN (16);
+
+ *(.console_gdb_xfer)
+ *(.bootstrap_data)
+ . = ALIGN(16);
+ _estuff = .;
+ PROVIDE (_etext = .);
+ } > dram
+
+ .data :
+ {
+ PROVIDE( _data_dest_start = . );
+ PROVIDE( _copy_start = .);
+ *(.data)
+ *(.gnu.linkonce.d*)
+ *(.gcc_except_table*)
+ *(.jcr)
+ . = ALIGN (16);
+ PROVIDE (_edata = .);
+ PROVIDE (_copy_end = .);
+ PROVIDE (_data_dest_end = . );
+ } > dram
+
+ _data_src_start = _estuff;
+ _data_src_end = _data_dest_start + SIZEOF(.data);
+
+ .bss :
+ {
+ _clear_start = .;
+ *(.bss*)
+ *(COMMON)
+ . = ALIGN (16);
+ PROVIDE (_end = .);
+
+ _clear_end = .;
+ _WorkspaceBase = .;
+ } > dram
+
+ .start_stack :
+ {
+ /*
+ * Starting Stack
+ */
+ . += _StackSize;
+ . = ALIGN (16);
+ PROVIDE(_StackInit = .);
+ } > core_sram
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+
+ PROVIDE (end_of_all = .);
+}
diff --git a/c/src/lib/libbsp/m68k/mcf5329/startup/linkcmdsflash b/c/src/lib/libbsp/m68k/mcf5329/startup/linkcmdsflash
new file mode 100644
index 0000000000..fdc222cfab
--- /dev/null
+++ b/c/src/lib/libbsp/m68k/mcf5329/startup/linkcmdsflash
@@ -0,0 +1,182 @@
+/*
+ * This file contains directives for the GNU linker which are specific
+ * to the Freescale ColdFire mcf52235
+ *
+ * COPYRIGHT (c) 1989-1999.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.e
+ *
+ * $Id$
+ */
+
+/*
+ * Declare some sizes.
+ */
+_CoreSRamBase = DEFINED(_RamBase) ? _RamBase : 0x80000000;
+_CoreSRamSize = DEFINED(_RamSize) ? _RamSize : 32K;
+
+_RamBase = DEFINED(_RamBase) ? _RamBase : 0x40000000;
+_RamSize = DEFINED(_RamSize) ? _RamSize : 32M;
+
+_BootFlashBase = DEFINED(_FlashBase) ? _FlashBase : 0x00000000;
+_BootFlashSize = DEFINED(_FlashBase) ? _FlashBase : 2M;
+
+_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0;
+_StackSize = DEFINED(_StackSize) ? _StackSize : 0x400;
+
+_VBR = 0x40000000;
+
+ENTRY(start)
+
+MEMORY
+{
+ core_sram : ORIGIN = 0x80000000, LENGTH = 32K
+ boot_flash : ORIGIN = 0x00000000, LENGTH = 2M
+ dram : ORIGIN = 0x40000000, LENGTH = 32M
+}
+
+SECTIONS
+{
+ /*
+ * Text, data and bss segments
+ */
+ .text : {
+
+ *(.text*)
+ *(.ram_code)
+
+ /*
+ * C++ constructors/destructors
+ */
+ *(.gnu.linkonce.t.*)
+
+ /*
+ * Initialization and finalization code.
+ *
+ * Various files can provide initialization and finalization
+ * functions. crtbegin.o and crtend.o are two instances. The
+ * body of these functions are in .init and .fini sections. We
+ * accumulate the bodies here, and prepend function prologues
+ * from crti.o and function epilogues from crtn.o. crti.o must
+ * be linked first; crtn.o must be linked last. Because these
+ * are wildcards, it doesn't matter if the user does not
+ * actually link against crti.o and crtn.o; the linker won't
+ * look for a file to match a wildcard. The wildcard also
+ * means that it doesn't matter which directory crti.o and
+ * crtn.o are in.
+ */
+ PROVIDE (_init = .);
+ *crti.o(.init)
+ *(.init)
+ *crtn.o(.init)
+ PROVIDE (_fini = .);
+ *crti.o(.fini)
+ *(.fini)
+ *crtn.o(.fini)
+
+ /*
+ * Special FreeBSD sysctl sections.
+ */
+ . = ALIGN (16);
+ __start_set_sysctl_set = .;
+ *(set_sysctl_*);
+ __stop_set_sysctl_set = ABSOLUTE(.);
+ *(set_domain_*);
+ *(set_pseudo_*);
+
+ /*
+ * C++ constructors/destructors
+ *
+ * gcc uses crtbegin.o to find the start of the constructors
+ * and destructors so we make sure it is first. Because this
+ * is a wildcard, it doesn't matter if the user does not
+ * actually link against crtbegin.o; the linker won't look for
+ * a file to match a wildcard. The wildcard also means that
+ * it doesn't matter which directory crtbegin.o is in. The
+ * constructor and destructor list are terminated in
+ * crtend.o. The same comments apply to it.
+ */
+ . = ALIGN (16);
+ *crtbegin.o(.ctors)
+ *(.ctors)
+ *crtend.o(.ctors)
+ *crtbegin.o(.dtors)
+ *(.dtors)
+ *crtend.o(.dtors)
+
+ /*
+ * Exception frame info
+ */
+ . = ALIGN (16);
+ *(.eh_frame)
+
+ /*
+ * Read-only data
+ */
+ . = ALIGN (16);
+ _rodata_start = . ;
+ *(.rodata*)
+ *(.gnu.linkonce.r*)
+
+ . = ALIGN (16);
+
+ *(.console_gdb_xfer)
+ *(.bootstrap_data)
+ . = ALIGN(16);
+ _estuff = .;
+ PROVIDE (_etext = .);
+ } > boot_flash
+
+ .data 0x40000500 : AT (_estuff)
+ {
+ PROVIDE( _data_dest_start = . );
+ PROVIDE( _copy_start = .);
+ *(.data)
+ *(.gnu.linkonce.d*)
+ *(.gcc_except_table*)
+ *(.jcr)
+ . = ALIGN (16);
+ PROVIDE (_edata = .);
+ PROVIDE (_copy_end = .);
+ PROVIDE (_data_dest_end = . );
+ } > dram
+
+ _data_src_start = _estuff;
+ _data_src_end = _data_dest_start + SIZEOF(.data);
+
+ .bss :
+ {
+ _clear_start = .;
+ *(.bss*)
+ *(COMMON)
+ . = ALIGN (16);
+ PROVIDE (_end = .);
+
+ _clear_end = .;
+ _WorkspaceBase = .;
+ } > dram
+
+ .start_stack :
+ {
+ /*
+ * Starting Stack
+ */
+ . += _StackSize;
+ . = ALIGN (16);
+ PROVIDE(_StackInit = .);
+ } > core_sram
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+
+ PROVIDE (end_of_all = .);
+}