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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [libgloss/] [sparc/] [cygmon-sparc64-ld.src] - Blame information for rev 1765

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 = 0x4000;
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 = 0x4000, 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
    *(.ctors)
80
    LONG(0)
81
    __CTOR_END__ = .;
82
    __DTOR_LIST__ = .;
83
    LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
84
    *(.dtors)
85
     LONG(0)
86
    __DTOR_END__ = .;
87
    *(.init)
88
    *(.lit)
89
    *(.rodata)
90
    *(.shdata)
91
    *(.eh_frame)
92
    *(.gnu.linkonce.t*)
93
    *(.gnu.linkonce.r*)
94
    *(.gcc_except_table)
95
    *(.fini)
96
    _etext  =  .;
97
  }  > ram
98
  .shbss SIZEOF(.text) + ADDR(.text) :  {
99
    *(.shbss)
100
  }
101
  .talias : { }  > ram
102
  .data  : {
103
    sdata  =  .;
104
    _sdata  =  .;
105
    *(.data)
106
    *(.gnu.linkonce.d*)
107
    edata  =  .;
108
    _edata  =  .;
109
  } > ram
110
  .bss SIZEOF(.data) + ADDR(.data) : {
111
   sbss = . ;
112
   _sbss = . ;
113
   __bss_start = ALIGN(0x8);
114
   __bss_start = ALIGN(0x8);
115
   *(.bss)
116
   *(COMMON)
117
     end = ALIGN(0x8);
118
     _end = ALIGN(0x8);
119
     __end = ALIGN(0x8);
120
     ebss = .;
121
     _ebss = .;
122
  }
123
  .mstack  : { }  > ram
124
  .rstack  : { }  > ram
125
  /* Stabs debugging sections.  */
126
  .stab 0 : { *(.stab) }
127
  .stabstr 0 : { *(.stabstr) }
128
  .stab.excl 0 : { *(.stab.excl) }
129
  .stab.exclstr 0 : { *(.stab.exclstr) }
130
  .stab.index 0 : { *(.stab.index) }
131
  .stab.indexstr 0 : { *(.stab.indexstr) }
132
  .comment 0 : { *(.comment) }
133
  /* DWARF debug sections.
134
     Symbols in the DWARF debugging sections are relative to the beginning
135
     of the section so we begin them at 0.  */
136
  /* DWARF 1 */
137
  .debug          0 : { *(.debug) }
138
  .line           0 : { *(.line) }
139
  /* GNU DWARF 1 extensions */
140
  .debug_srcinfo  0 : { *(.debug_srcinfo) }
141
  .debug_sfnames  0 : { *(.debug_sfnames) }
142
  /* DWARF 1.1 and DWARF 2 */
143
  .debug_aranges  0 : { *(.debug_aranges) }
144
  .debug_pubnames 0 : { *(.debug_pubnames) }
145
  /* DWARF 2 */
146
  .debug_info     0 : { *(.debug_info) }
147
  .debug_abbrev   0 : { *(.debug_abbrev) }
148
  .debug_line     0 : { *(.debug_line) }
149
  .debug_frame    0 : { *(.debug_frame) }
150
  .debug_str      0 : { *(.debug_str) }
151
  .debug_loc      0 : { *(.debug_loc) }
152
  .debug_macinfo  0 : { *(.debug_macinfo) }
153
  /* SGI/MIPS DWARF 2 extensions */
154
  .debug_weaknames 0 : { *(.debug_weaknames) }
155
  .debug_funcnames 0 : { *(.debug_funcnames) }
156
  .debug_typenames 0 : { *(.debug_typenames) }
157
  .debug_varnames  0 : { *(.debug_varnames) }
158
  /* These must appear regardless of  .  */
159
}

powered by: WebSVN 2.1.0

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