OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [newlib/] [libgloss/] [sparc/] [cygmon.ld.src] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 39 lampret
/*
2
 *uncomment this if you want the linker to output srecords.
3
OUTPUT_FORMAT(srec)
4
 *
5
 */
6
ENTRY(start)
7
OUTPUT_ARCH(TARGET_OBJ_FORMAT)
8
SEARCH_DIR(.)
9
STARTUP(cygmon-crt0.o)
10
GROUP(cygmon-salib.o -lc -lgcc -lc)
11
 
12
/*
13
 * The memory map looks like this:
14
 * +--------------------+ <- low memory
15
 * | .text              |
16
 * |        _stext      |
17
 * |        _etext      |
18
 * |        ctor list   | the ctor and dtor lists are for
19
 * |        dtor list   | C++ support
20
 * |        _end_text   |
21
 * +--------------------+
22
 * | .data              | initialized data goes here
23
 * |        _sdata      |
24
 * |        _edata      |
25
 * +--------------------+
26
 * | .bss               |
27
 * |        __bss_start | start of bss, cleared by crt0
28
 * |        _end        | start of heap, used by sbrk()
29
 * +--------------------+
30
 * |    heap space      |
31
 * |        _ENDHEAP    |
32
 * |    stack space     |
33
 * |        __stack     | top of stack
34
 * +--------------------+ <- high memory
35
 */
36
 
37
_STACK_SIZE = (16 * 1024);
38
_RAM_SIZE = 1M;
39
_RAM_START = TARGET_RAM_START;
40
_RAM_END = _RAM_START + _RAM_SIZE;
41
 
42
/*
43
 * Setup the standard memory map. The stack grows down towards low memory.
44
 */
45
MEMORY
46
{
47
  ram     : ORIGIN = TARGET_RAM_START, LENGTH = 1M
48
}
49
 
50
__stack = (_RAM_START + _RAM_SIZE - 4 * 16) - _STACK_SIZE;
51
 
52
/*
53
 * All the symbols that might be accessed from C code need to be
54
 * listed twice, once with an additional underscore. aout format needs
55
 * and extra underscore, whereas coff & elf doesn't. This is to work
56
 * with both.
57
 */
58
/*
59
 * Initalize some symbols to be zero so we can reference them in the
60
 * crt0 without core dumping. These functions are all optional, but
61
 * we do this so we can have our crt0 always use them if they exist.
62
 * This is so BSPs work better when using the crt0 installed with gcc.
63
 * We have to initalize them twice, so we cover a.out (which prepends
64
 * an underscore) and coff object file formats.
65
 */
66
PROVIDE (hardware_init_hook = 0);
67
PROVIDE (_hardware_init_hook = 0);
68
PROVIDE (software_init_hook = 0);
69
PROVIDE (_software_init_hook = 0);
70
SECTIONS
71
{
72
  .text : {
73
    stext = .;
74
    _stext = .;
75
    CREATE_OBJECT_SYMBOLS
76
    *(.text)
77
     __CTOR_LIST__ = .;
78
    LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
79 56 joel
    KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
80
    KEEP (*(SORT(.ctors.*)))
81
    KEEP (*crtend.o(.ctors))
82 39 lampret
    LONG(0)
83
    __CTOR_END__ = .;
84
    __DTOR_LIST__ = .;
85
    LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
86 56 joel
    KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
87
    KEEP (*(SORT(.dtors.*)))
88
    KEEP (*crtend.o(.dtors))
89 39 lampret
     LONG(0)
90
    __DTOR_END__ = .;
91
    *(.init)
92
    *(.lit)
93
    *(.rodata)
94
    *(.shdata)
95
    *(.eh_frame)
96
    *(.gnu.linkonce.t*)
97
    *(.gnu.linkonce.r*)
98
    *(.gcc_except_table)
99
    *(.fini)
100
    _etext  =  .;
101
  }  > ram
102
  .shbss SIZEOF(.text) + ADDR(.text) :  {
103
    *(.shbss)
104
  }
105
  .talias : { }  > ram
106
  .data  : {
107
    sdata  =  .;
108
    _sdata  =  .;
109
    *(.data)
110
    *(.gnu.linkonce.d*)
111
    edata  =  .;
112
    _edata  =  .;
113
  } > ram
114
  .bss SIZEOF(.data) + ADDR(.data) : {
115
   sbss = . ;
116
   _sbss = . ;
117
   __bss_start = ALIGN(0x8);
118
   __bss_start = ALIGN(0x8);
119
   *(.bss)
120
   *(COMMON)
121
     end = ALIGN(0x8);
122
     _end = ALIGN(0x8);
123
     __end = ALIGN(0x8);
124
     ebss = .;
125
     _ebss = .;
126
  }
127
  .mstack  : { }  > ram
128
  .rstack  : { }  > ram
129
  .stab  0 (NOLOAD) : {
130
    [ .stab ]
131
  }
132
  .stabstr  0 (NOLOAD) :
133
  {
134
    [ .stabstr ]
135
  }
136
/* DWARF debug sections.
137
   Symbols in the DWARF debugging sections are relative to the beginning
138
   of the section so we begin them at 0.  */
139
/* DWARF 1 */
140
  .debug    0 (NOLOAD) :
141
  {
142
    [ .debug ]
143
  }
144
  .line     0 (NOLOAD) :
145
  {
146
    [ .line ]
147
  }
148
/* GNU DWARF 1 extensions */
149
  .debug_srcinfo 0 (NOLOAD) :
150
  {
151
    [ .debug_srcinfo ]
152
  }
153
  .debug_sfnames  0 (NOLOAD) :
154
  {
155
    [ .debug_sfnames ]
156
  }
157
/* DWARF 1.1 and DWARF 2 */
158
  .debug_aranges  0 (NOLOAD) :
159
  {
160
    [ .debug_aranges ]
161
  }
162
  .debug_pubnames 0 (NOLOAD) :
163
  {
164
    [ .debug_pubnames ]
165
  }
166
/* DWARF 2 */
167
  .debug_info     0 (NOLOAD) :
168
  {
169
    [ .debug_info ]
170
  }
171
  .debug_abbrev   0 (NOLOAD) :
172
  {
173
    [ .debug_abbrev ]
174
  }
175
  .debug_line     0 (NOLOAD) :
176
  {
177
    [ .debug_line ]
178
  }
179
  .debug_frame    0 (NOLOAD) :
180
  {
181
    [ .debug_frame ]
182
  }
183
  .debug_str      0 (NOLOAD) :
184
  {
185
    [ .debug_str ]
186
  }
187
  .debug_loc      0 (NOLOAD) :
188
  {
189
    [ .debug_loc ]
190
  }
191
  .debug_macinfo  0 (NOLOAD) :
192
  {
193
    [ .debug_macinfo ]
194
  }
195
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.