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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib-1.10.0/] [libgloss/] [mips/] [idt32.ld] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1005 ivang
/* The following TEXT start address leaves space for the monitor
2
   workspace.  This linker script links isa32 programs for use with the
3
   simulator.  */
4
 
5
ENTRY(_start)
6
OUTPUT_ARCH("mips:isa32")
7
OUTPUT_FORMAT("elf32-littlemips", "elf32-bigmips", "elf32-littlemips")
8
GROUP(-lc -lidt -lgcc)
9
SEARCH_DIR(.)
10
__DYNAMIC  =  0;
11
STARTUP(crt0.o)
12
 
13
/*
14
 * Allocate the stack to be at the top of memory, since the stack
15
 * grows down
16
 */
17
PROVIDE (__stack = 0);
18
/* PROVIDE (__global = 0); */
19
 
20
/*
21
 * Initalize some symbols to be zero so we can reference them in the
22
 * crt0 without core dumping. These functions are all optional, but
23
 * we do this so we can have our crt0 always use them if they exist.
24
 * This is so BSPs work better when using the crt0 installed with gcc.
25
 * We have to initalize them twice, so we multiple object file
26
 * formats, as some prepend an underscore.
27
 */
28
PROVIDE (hardware_init_hook = 0);
29
PROVIDE (software_init_hook = 0);
30
 
31
SECTIONS
32
{
33
  . = 0x80020000;
34
  .text : {
35
     _ftext = . ;
36
    PROVIDE (eprol  =  .);
37
    *(.text)
38
    *(.text.*)
39
    *(.gnu.linkonce.t*)
40
    *(.mips16.fn.*)
41
    *(.mips16.call.*)
42
  }
43
  .init : {
44
    *(.init)
45
  }
46
  .fini : {
47
    *(.fini)
48
  }
49
  .rel.sdata : {
50
    PROVIDE (__runtime_reloc_start = .);
51
    *(.rel.sdata)
52
    PROVIDE (__runtime_reloc_stop = .);
53
  }
54
  PROVIDE (etext  =  .);
55
  _etext  =  .;
56
 
57
 
58
  .ctors    :
59
  {
60
    /* gcc uses crtbegin.o to find the start of
61
       the constructors, so we make sure it is
62
       first.  Because this is a wildcard, it
63
       doesn't matter if the user does not
64
       actually link against crtbegin.o; the
65
       linker won't look for a file to match a
66
       wildcard.  The wildcard also means that it
67
       doesn't matter which directory crtbegin.o
68
       is in.  */
69
 
70
    KEEP (*crtbegin.o(.ctors))
71
 
72
    /* We don't want to include the .ctor section from
73
       from the crtend.o file until after the sorted ctors.
74
       The .ctor section from the crtend file contains the
75
       end of ctors marker and it must be last */
76
 
77
    KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
78
    KEEP (*(SORT(.ctors.*)))
79
    KEEP (*(.ctors))
80
  }
81
 
82
  .dtors    :
83
  {
84
    KEEP (*crtbegin.o(.dtors))
85
    KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
86
    KEEP (*(SORT(.dtors.*)))
87
    KEEP (*(.dtors))
88
  }
89
 
90
  . = .;
91
  .rodata : {
92
    *(.rdata)
93
    *(.rodata)
94
    *(.rodata.*)
95
    *(.gnu.linkonce.r*)
96
  }
97
   _fdata = ALIGN(16);
98
  .data : {
99
    *(.data)
100
    *(.data.*)
101
    *(.gnu.linkonce.d*)
102
  }
103
  . = ALIGN(8);
104
  _gp = . + 0x8000;
105
  __global = _gp;
106
  .lit8 : {
107
    *(.lit8)
108
  }
109
  .lit4 : {
110
    *(.lit4)
111
  }
112
  .sdata : {
113
    *(.sdata)
114
    *(.sdata.*)
115
    *(.gnu.linkonce.s*)
116
  }
117
  . = ALIGN(4);
118
  PROVIDE (edata  =  .);
119
  _edata  =  .;
120
  _fbss = .;
121
  .sbss : {
122
    *(.sbss)
123
    *(.scommon)
124
  }
125
  .bss : {
126
    _bss_start = . ;
127
    *(.bss)
128
    *(COMMON)
129
  }
130
 
131
   PROVIDE (end = .);
132
   _end = .;
133
 
134
  /* DWARF debug sections.
135
     Symbols in the DWARF debugging sections are relative to
136
     the beginning of the section so we begin them at 0.  */
137
 
138
  /* DWARF 1 */
139
  .debug          0 : { *(.debug) }
140
  .line           0 : { *(.line) }
141
 
142
  /* GNU DWARF 1 extensions */
143
  .debug_srcinfo  0 : { *(.debug_srcinfo) }
144
  .debug_sfnames  0 : { *(.debug_sfnames) }
145
 
146
  /* DWARF 1.1 and DWARF 2 */
147
  .debug_aranges  0 : { *(.debug_aranges) }
148
  .debug_pubnames 0 : { *(.debug_pubnames) }
149
 
150
  /* DWARF 2 */
151
  .debug_info     0 : { *(.debug_info) }
152
  .debug_abbrev   0 : { *(.debug_abbrev) }
153
  .debug_line     0 : { *(.debug_line) }
154
  .debug_frame    0 : { *(.debug_frame) }
155
  .debug_str      0 : { *(.debug_str) }
156
  .debug_loc      0 : { *(.debug_loc) }
157
  .debug_macinfo  0 : { *(.debug_macinfo) }
158
 
159
  /* SGI/MIPS DWARF 2 extensions */
160
  .debug_weaknames 0 : { *(.debug_weaknames) }
161
  .debug_funcnames 0 : { *(.debug_funcnames) }
162
  .debug_typenames 0 : { *(.debug_typenames) }
163
  .debug_varnames  0 : { *(.debug_varnames) }
164
}

powered by: WebSVN 2.1.0

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