source: rtems/c/src/lib/libbsp/mips/hurricane/startup/linkcmds @ d1f57b5

4.104.114.95
Last change on this file since d1f57b5 was d1f57b5, checked in by Joel Sherrill <joel.sherrill@…>, on 03/03/08 at 23:07:47

2008-03-03 Joel Sherrill <joel.sherrill@…>

  • startup/linkcmds: Add wildcard to gcc_except_table section so programs compiled with gcc 4.3.x can link.
  • Property mode set to 100644
File size: 3.2 KB
Line 
1/*
2 *   linkcmds,v 1.6 2003/01/20 20:20:10 joel Exp
3 */
4
5/*
6 * Declare some sizes.
7 */
8_RamBase = DEFINED(_RamBase) ? _RamBase : 0x80000000;
9_RamSize = DEFINED(_RamSize) ? _RamSize : 4M;
10_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
11
12SECTIONS
13{
14  /* 0x80000000 - 0x8001FFFF used by PMON (with 0x80010000 - 0x8001FFFF as heap for symbol storage)
15        0x80020000 - 0x8002FFFF reserved for shared memory
16        0x80030000 beginning of text (code) section
17   */
18  .text 0x80030000  :
19  {
20    _ftext = . ;
21    eprol = .;
22    *(.text)
23    *(.text.*)
24    *(.gnu.linkonce.t*)
25    *(.mips16.fn.*)
26    *(.mips16.call.*)
27    PROVIDE (__runtime_reloc_start = .);
28    *(.rel.sdata)
29    PROVIDE (__runtime_reloc_stop = .);
30
31      /*
32       * Special FreeBSD sysctl sections.
33       */
34      . = ALIGN (16);
35      __start_set_sysctl_set = .;
36      *(set_sysctl_*);
37      __stop_set_sysctl_set = ABSOLUTE(.);
38      *(set_domain_*);
39      *(set_pseudo_*);
40
41      *(.gcc_except_table*)
42      *(.eh_frame_hdr)
43      *(.eh_frame)
44  }
45
46  .init :
47  {
48        KEEP(*crti.o(.init))
49        KEEP(*(.init))
50        KEEP(*crtn.o(.init))
51  }
52
53  .fini :
54  {
55        KEEP(*crti.o(.fini))
56        KEEP(*(.fini))
57        KEEP(*crtn.o(.fini))
58  }
59
60  .ctors    :
61  {
62    /* gcc uses crtbegin.o to find the start of
63       the constructors, so we make sure it is
64       first.  Because this is a wildcard, it
65       doesn't matter if the user does not
66       actually link against crtbegin.o; the
67       linker won't look for a file to match a
68       wildcard.  The wildcard also means that it
69       doesn't matter which directory crtbegin.o
70       is in.  */
71
72    KEEP (*crtbegin.o(.ctors))
73
74    /* We don't want to include the .ctor section from
75       from the crtend.o file until after the sorted ctors.
76       The .ctor section from the crtend file contains the
77       end of ctors marker and it must be last */
78
79    KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
80    KEEP (*(SORT(.ctors.*)))
81    KEEP (*(.ctors))
82  }
83
84  .dtors    :
85  {
86    KEEP (*crtbegin.o(.dtors))
87    KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
88    KEEP (*(SORT(.dtors.*)))
89    KEEP (*(.dtors))
90
91    etext  =  .;
92    _etext  =  .;
93  }
94
95  .rdata : {
96    *(.rdata)
97    *(.rodata)
98    *(.rodata.*)
99    *(.gnu.linkonce.r*)
100  }
101   _fdata = ALIGN(16);
102
103  .data : {
104    *(.data)
105    *(.data.*)
106    *(.gnu.linkonce.d*)
107    SORT(CONSTRUCTORS)
108  }
109  . = ALIGN(8);
110
111  .jcr : {
112        KEEP (*(.jcr))
113  }
114
115  _gp = ALIGN(16) + 0x8000;
116  __global = _gp;
117
118  .sdata : {
119    *(.sdata)
120    *(.sdata.*)
121    *(.gnu.linkonce.s*)
122  }
123  .lit8 : {
124    *(.lit8)
125  }
126  .lit4 : {
127    *(.lit4)
128  }
129
130   edata  =  .;
131   _edata  =  .;
132   _fbss = .;
133
134  .sbss : {
135    *(.sbss)
136    *(.scommon)
137  }
138  .bss : {
139    _bss_start = . ;
140    *(.bss)
141    *(.reginfo)
142    *(COMMON)
143    . = ALIGN (64);
144    _stack_limit = .;
145    . += _StackSize;
146    __stack = .;
147    _stack_init = .;
148     end = .;
149    _end = .;
150  }
151
152
153  /* Debug sections.  These should never be loadable, but they must have
154     zero addresses for the debuggers to work correctly.  */
155  .line                 0 : { *(.line)                  }
156  .debug                0 : { *(.debug)                 }
157  .debug_sfnames        0 : { *(.debug_sfnames)         }
158  .debug_srcinfo        0 : { *(.debug_srcinfo)         }
159  .debug_macinfo        0 : { *(.debug_macinfo)         }
160  .debug_pubnames       0 : { *(.debug_pubnames)        }
161  .debug_aranges        0 : { *(.debug_aranges)         }
162}
Note: See TracBrowser for help on using the repository browser.