summaryrefslogtreecommitdiff
path: root/bsp/rm48x50/rm48x50.ld
diff options
context:
space:
mode:
authorGrissiom <[email protected]>2013-10-20 04:06:56 +0800
committerGrissiom <[email protected]>2013-10-20 18:51:45 +0800
commit9568669109ffcb3aa6de8d07959795de71d505ae (patch)
tree248a5837cad06c061d924b99788a984885cd3494 /bsp/rm48x50/rm48x50.ld
parent2f4329430d548daa0c7b0b3f758c3b3c6776de8d (diff)
rm48x50: add GCC support
Diffstat (limited to 'bsp/rm48x50/rm48x50.ld')
-rw-r--r--bsp/rm48x50/rm48x50.ld144
1 files changed, 144 insertions, 0 deletions
diff --git a/bsp/rm48x50/rm48x50.ld b/bsp/rm48x50/rm48x50.ld
new file mode 100644
index 0000000000..340a3a3223
--- /dev/null
+++ b/bsp/rm48x50/rm48x50.ld
@@ -0,0 +1,144 @@
+/*
+ * linker script for RM48x50 with GNU ld
+ * Grissiom 2013-10-20
+ */
+
+/* Program Entry, set to mark it as "used" and avoid gc */
+MEMORY
+{
+ CODE (rx) : ORIGIN = 0x00000000, LENGTH = 3M
+ DATA (rw) : ORIGIN = 0x08000000, LENGTH = 256k
+}
+
+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+ENTRY(system_vectors)
+SECTIONS
+{
+ .text :
+ {
+ __text_start = .;
+ *(.vectors)
+ *(.text)
+ *(.text.*)
+
+ __rodata_start = .;
+ *(.rodata)
+ *(.rodata.*)
+ __rodata_end = .;
+
+ *(.glue_7)
+ *(.glue_7t)
+ *(.vfp11_veneer)
+ *(.v4_bx)
+ *(.gnu.linkonce.t*)
+
+ /* section information for finsh shell */
+ . = ALIGN(4);
+ __fsymtab_start = .;
+ KEEP(*(FSymTab))
+ __fsymtab_end = .;
+ . = ALIGN(4);
+ __vsymtab_start = .;
+ KEEP(*(VSymTab))
+ __vsymtab_end = .;
+ . = ALIGN(4);
+
+ /* section information for modules */
+ . = ALIGN(4);
+ __rtmsymtab_start = .;
+ KEEP(*(RTMSymTab))
+ __rtmsymtab_end = .;
+
+ /* section information for initialization */
+ . = ALIGN(4);
+ __rt_init_start = .;
+ KEEP(*(SORT(.rti_fn*)))
+ __rt_init_end = .;
+
+ __text_end = .;
+ } > CODE = 0
+
+ . = ALIGN(4);
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } > CODE
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ /* This is used by the startup in order to initialize the .data secion */
+ _sidata = .;
+ } > CODE
+
+ /* .ARM.exidx is sorted, so has to go in its own output section. */
+ __exidx_start = .;
+ .ARM.exidx :
+ {
+ *(.ARM.exidx* .gnu.linkonce.armexidx.*)
+
+ /* This is used by the startup in order to initialize the .data secion */
+ _sidata = .;
+ } > CODE
+ __exidx_end = .;
+
+ /* .data section which is used for initialized data */
+ .data : AT (_sidata)
+ {
+ . = ALIGN(4);
+ /* This is used by the startup in order to initialize the .data secion */
+ _sdata = . ;
+
+ *(.data)
+ *(.data.*)
+ *(.gnu.linkonce.d*)
+
+ . = ALIGN(4);
+ /* This is used by the startup in order to initialize the .data secion */
+ _edata = . ;
+ } >DATA
+ __data_end = .;
+
+ __noinit_start = .;
+ .noinit :
+ {
+ . = ALIGN(4);
+ *(.bss.noinit)
+ } > DATA
+ __noinit_stop = .;
+
+ __bss_start = .;
+ .bss :
+ {
+ . = ALIGN(4);
+ /* This is used by the startup in order to initialize the .bss secion */
+ _sbss = .;
+
+ *(.bss)
+ *(.bss.*)
+ *(COMMON)
+
+ . = ALIGN(4);
+ /* This is used by the startup in order to initialize the .bss secion */
+ _ebss = . ;
+ } > DATA
+ __bss_end = .;
+
+ /* 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) }
+ */
+ _end = .;
+}