source: rtems/c/src/lib/libbsp/powerpc/shared/startup/linkcmds @ 4f3e4f33

4.104.114.84.95
Last change on this file since 4f3e4f33 was 4f3e4f33, checked in by Joel Sherrill <joel.sherrill@…>, on 02/20/03 at 21:32:07

2003-02-20 Till Straumann <strauman@…>

PR 349/bsps

  • console/console.c, console/uart.c, console/uart.h: implement IOCTLs for the serial (UART) console to install/retrieve a BREAK-IRQ callback. The callback routine (if installed) is invoked from the UART ISR when a BREAK interrupt is detected. This can be used e.g. to enforce a "hotkey" reboot a la vxWorks Ctrl-X (although we use the serial line break condition) NOTE: The callback runs in ISR context.
  • Property mode set to 100644
File size: 6.6 KB
Line 
1OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
2              "elf32-powerpc")
3OUTPUT_ARCH(powerpc)
4ENTRY(_start)
5/* Do we need any of these for elf?
6   __DYNAMIC = 0;    */
7PROVIDE (__stack = 0);
8MEMORY {
9        VECTORS : ORIGIN = 0x0 ,  LENGTH = 0x3000
10        CODE : ORIGIN = 0x3000 , LENGTH = 0x400000
11}
12SECTIONS
13{
14  .entry_point_section :
15  {
16        *(.entry_point_section)
17  } > VECTORS
18
19  /*
20   * This section is used only if NO_DYNAMIC_EXCEPTION_VECTOR_INSTALL
21   * is defined in vectors/vectors.S
22   */
23  .vectors :
24  {
25    *(.vectors)
26  } > VECTORS
27
28  /* Read-only sections, merged into text segment: */
29  .interp   : { *(.interp) }    > CODE
30  .hash           : { *(.hash)          }       > CODE
31  .dynsym         : { *(.dynsym)                }       > CODE
32  .dynstr         : { *(.dynstr)                }       > CODE
33  .gnu.version   : { *(.gnu.version)      }     > CODE
34  .gnu.version_d   : { *(.gnu.version_d)  }     > CODE
35  .gnu.version_r   : { *(.gnu.version_r)  }     > CODE
36  .rela.text     :
37    { *(.rela.text) *(.rela.gnu.linkonce.t*) }  > CODE
38  .rela.data     :
39    { *(.rela.data) *(.rela.gnu.linkonce.d*) }  > CODE
40  .rela.rodata   :
41    { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }        > CODE
42  .rela.got       : { *(.rela.got)      }       > CODE
43  .rela.got1      : { *(.rela.got1)     }       > CODE
44  .rela.got2      : { *(.rela.got2)     }       > CODE
45  .rela.ctors     : { *(.rela.ctors)    }       > CODE
46  .rela.dtors     : { *(.rela.dtors)    }       > CODE
47  .rela.init      : { *(.rela.init)     }       > CODE
48  .rela.fini      : { *(.rela.fini)     }       > CODE
49  .rela.bss       : { *(.rela.bss)      }       > CODE
50  .rela.plt       : { *(.rela.plt)      }       > CODE
51  .rela.sdata     : { *(.rela.sdata)    }       > CODE
52  .rela.sbss      : { *(.rela.sbss)     }       > CODE
53  .rela.sdata2    : { *(.rela.sdata2)   }       > CODE
54  .rela.sbss2     : { *(.rela.sbss2)    }       > CODE
55  .text      : 
56  {
57    *(.text)   
58
59    /*
60     * Special FreeBSD sysctl sections.
61     */
62    . = ALIGN (16);
63    __start_set_sysctl_set = .;
64    *(set_sysctl_*);
65    __stop_set_sysctl_set = ABSOLUTE(.);
66    *(set_domain_*);
67    *(set_pseudo_*);
68
69    /* .gnu.warning sections are handled specially by elf32.em.  */
70    *(.gnu.warning)
71    *(.gnu.linkonce.t*)
72  }  > CODE
73  .init           : { _init = .; *(.init)       } >CODE
74  .fini           : { _fini = .; *(.fini)       } >CODE
75  .rodata         : { *(.rodata*) *(.gnu.linkonce.r*) } > CODE
76  .rodata1        : { *(.rodata1) }     > CODE
77  .eh_frame       : { *.(eh_frame)              } >CODE
78  .sdata2         : { *(.sdata2) *(.gnu.linkonce.s2.*)  } >CODE
79  .sbss2          : { *(.sbss2) *(.gnu.linkonce.sb2.*)  } >CODE
80  _etext = .;
81  PROVIDE (etext = .);
82  /* Adjust the address for the data segment.  We want to adjust up to
83     the same address within the page on the next page up.  It would
84     be more correct to do this:
85       . = ALIGN(0x40000) + (ALIGN(8) & (0x40000 - 1));
86     The current expression does not correctly handle the case of a
87     text segment ending precisely at the end of a page; it causes the
88     data segment to skip a page.  The above expression does not have
89     this problem, but it will currently (2/95) cause BFD to allocate
90     a single segment, combining both text and data, for this case.
91     This will prevent the text segment from being shared among
92     multiple executions of the program; I think that is more
93     important than losing a page of the virtual address space (note
94     that no actual memory is lost; the page which is skipped can not
95     be referenced).  */
96  . = ALIGN(0x1000);
97 .data    :
98  {
99    *(.data)
100    *(.gnu.linkonce.d*)
101    CONSTRUCTORS
102  } > CODE
103  .data1   : { *(.data1) }      > CODE
104  PROVIDE (__EXCEPT_START__ = .);
105  .gcc_except_table   : { *(.gcc_except_table) } > CODE
106  PROVIDE (__EXCEPT_END__ = .);
107  .got1           : { *(.got1) }        > CODE
108  .dynamic        : { *(.dynamic) }     > CODE
109  /* Put .ctors and .dtors next to the .got2 section, so that the pointers
110     get relocated with -mrelocatable. Also put in the .fixup pointers.
111     The current compiler no longer needs this, but keep it around for 2.7.2  */
112                PROVIDE (_GOT2_START_ = .);
113  .got2           :  { *(.got2) }       > CODE
114                PROVIDE (__CTOR_LIST__ = .);
115  .ctors          : { *(.ctors) }       > CODE
116                PROVIDE (__CTOR_END__ = .);
117                PROVIDE (__DTOR_LIST__ = .);
118  .dtors          : { *(.dtors) }       > CODE
119                PROVIDE (__DTOR_END__ = .);
120                PROVIDE (_FIXUP_START_ = .);
121  .fixup          : { *(.fixup) }       > CODE
122                PROVIDE (_FIXUP_END_ = .);
123                PROVIDE (_GOT2_END_ = .);
124                PROVIDE (_GOT_START_ = .);
125  .got            : { *(.got) } > CODE
126  .got.plt        : { *(.got.plt) }     > CODE
127                PROVIDE (_GOT_END_ = .);
128  /* We want the small data sections together, so single-instruction offsets
129     can access them all, and initialized data all before uninitialized, so
130     we can shorten the on-disk segment size.  */
131  .sdata          : { *(.sdata) *(.gnu.linkonce.s.*)    } >CODE
132  _edata  =  .;
133  PROVIDE (edata = .);
134  .sbss      :
135  {
136    PROVIDE (__sbss_start = .);
137    *(.sbss)
138    *(.scommon)
139    *(.dynsbss)
140    PROVIDE (__sbss_end = .);
141  } > CODE
142  .plt   : { *(.plt) }  > CODE
143  .bss       :
144  {
145   PROVIDE (__bss_start = .);
146   *(.dynbss)
147   *(.bss)
148   *(COMMON)
149  . = ALIGN(16);
150  } > CODE
151  . = ALIGN(16);
152  _end = . ;
153  __rtems_end = . ;
154  PROVIDE (end = .);
155  /DISCARD/ :
156  {
157    *(.comment)
158  }
159
160
161  /* Stabs debugging sections.  */
162  .stab 0 : { *(.stab) }
163  .stabstr 0 : { *(.stabstr) }
164  .stab.excl 0 : { *(.stab.excl) }
165  .stab.exclstr 0 : { *(.stab.exclstr) }
166  .stab.index 0 : { *(.stab.index) }
167  .stab.indexstr 0 : { *(.stab.indexstr) }
168  .comment 0 : { *(.comment) }
169
170  /* DWARF debug sections.
171     Symbols in the DWARF debugging sections are relative to the beginning
172     of the section so we begin them at 0.  */
173  /* DWARF 1 */
174  .debug          0 : { *(.debug) }
175  .line           0 : { *(.line) }
176 
177  /* GNU DWARF 1 extensions */
178  .debug_srcinfo  0 : { *(.debug_srcinfo) }
179  .debug_sfnames  0 : { *(.debug_sfnames) }
180 
181  /* DWARF 1.1 and DWARF 2 */
182  .debug_aranges  0 : { *(.debug_aranges) }
183  .debug_pubnames 0 : { *(.debug_pubnames) }
184 
185  /* DWARF 2 */
186  .debug_info     0 : { *(.debug_info) }
187  .debug_abbrev   0 : { *(.debug_abbrev) }
188  .debug_line     0 : { *(.debug_line) }
189  .debug_frame    0 : { *(.debug_frame) }
190  .debug_str      0 : { *(.debug_str) }
191  .debug_loc      0 : { *(.debug_loc) }
192  .debug_macinfo  0 : { *(.debug_macinfo) }
193 
194  /* SGI/MIPS DWARF 2 extensions */
195  .debug_weaknames 0 : { *(.debug_weaknames) }
196  .debug_funcnames 0 : { *(.debug_funcnames) }
197  .debug_typenames 0 : { *(.debug_typenames) }
198  .debug_varnames  0 : { *(.debug_varnames) }
199  /* These must appear regardless of  .  */
200}
Note: See TracBrowser for help on using the repository browser.