source: trunk/libs/newlib/src/libgloss/sh/sh3lcevb.ld @ 551

Last change on this file since 551 was 444, checked in by satin@…, 7 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 2.8 KB
Line 
1/* Linker script for the SH3 Low-Cost Eval Board. */
2
3SEARCH_DIR(.)
4GROUP(-lc -lgcc)
5__DYNAMIC  =  0;
6
7MEMORY
8{
9  ram (rwx) : ORIGIN = 0x8004000, LENGTH = 0x2000000
10}
11
12/* Put the stack up high. */
13/* (Commented out because it doesn't seem to work right) */
14/*PROVIDE (__stack = 0x8100000);*/
15
16/* Initalize some symbols to be zero so we can reference them in the
17   crt0 without core dumping. These functions are all optional, but
18   we do this so we can have our crt0 always use them if they exist.
19   This is so BSPs work better when using the crt0 installed with gcc.
20   We have to initalize them twice, so we cover a.out (which prepends
21   an underscore) and coff object file formats. */
22
23PROVIDE (hardware_init_hook = 0);
24PROVIDE (_hardware_init_hook = 0);
25PROVIDE (software_init_hook = 0);
26PROVIDE (_software_init_hook = 0);
27
28/* Put everything in ram (of course).  */
29
30SECTIONS
31{
32  .text :
33  {
34    *(.text)
35    . = ALIGN(0x4);
36     __CTOR_LIST__ = .;
37    LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
38    ___ctors = .;
39    *(.ctors)
40    ___ctors_end = .;
41    LONG(0)
42    __CTOR_END__ = .;
43    __DTOR_LIST__ = .;
44    LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
45    ___dtors = .;
46    *(.dtors)
47    ___dtors_end = .;
48     LONG(0)
49    __DTOR_END__ = .;
50    *(.rodata)
51    *(.gcc_except_table)
52
53     _etext = .;
54    *(.lit)
55  } > ram
56
57  .data BLOCK (0x4) :
58  {
59    *(.shdata)
60    *(.data)
61    _edata = .;
62  } > ram
63
64  .bss BLOCK (0x4) :
65  {
66    __bss_start = . ;
67    *(.shbss)
68    *(.bss)
69    *(COMMON)
70    _end =  ALIGN (0x8);
71    __end = _end;
72  } > ram
73
74  /* I know, I know, stack sections are supposed to be useless; but
75     this actually worked for me, as opposed to the PROVIDE. */
76  .stack 0x8100000 :
77  {
78        __stack = .;
79  } > ram
80
81  .stab 0 (NOLOAD) : { *(.stab) }
82  .stabstr 0 (NOLOAD) : { *(.stabstr) }
83
84  /* DWARF debug sections.
85     Symbols in the DWARF debugging sections are relative to
86     the beginning of the section so we begin them at 0.  */
87  /* DWARF 1 */
88  .debug          0 : { *(.debug) }
89  .line           0 : { *(.line) }
90  /* GNU DWARF 1 extensions */
91  .debug_srcinfo  0 : { *(.debug_srcinfo) }
92  .debug_sfnames  0 : { *(.debug_sfnames) }
93  /* DWARF 1.1 and DWARF 2 */
94  .debug_aranges  0 : { *(.debug_aranges) }
95  .debug_pubnames 0 : { *(.debug_pubnames) }
96  /* DWARF 2 */
97  .debug_info     0 : { *(.debug_info) }
98  .debug_abbrev   0 : { *(.debug_abbrev) }
99  .debug_line     0 : { *(.debug_line) }
100  .debug_frame    0 : { *(.debug_frame) }
101  .debug_str      0 : { *(.debug_str) }
102  .debug_loc      0 : { *(.debug_loc) }
103  .debug_macinfo  0 : { *(.debug_macinfo) }
104  .debug_ranges   0 : { *(.debug_ranges) }
105  /* SGI/MIPS DWARF 2 extensions */
106  .debug_weaknames 0 : { *(.debug_weaknames) }
107  .debug_funcnames 0 : { *(.debug_funcnames) }
108  .debug_typenames 0 : { *(.debug_typenames) }
109  .debug_varnames  0 : { *(.debug_varnames) }
110}
Note: See TracBrowser for help on using the repository browser.