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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [newlib-1.17.0/] [libgloss/] [sparc/] [ex931.ld] - Blame information for rev 866

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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