1183234Ssimon/* $FreeBSD$ */
2280304Sjkim
3280304SjkimOUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
4183234SsimonOUTPUT_ARCH(powerpc:common)
5183234SsimonENTRY(_start)
6183234SsimonSEARCH_DIR(/usr/lib);
7183234SsimonPROVIDE (__stack = 0);
8183234SsimonSECTIONS
9183234Ssimon{
10183234Ssimon  /* Read-only sections, merged into text segment: */
11183234Ssimon  . = 0x00010000 + SIZEOF_HEADERS;
12183234Ssimon  .interp     : { *(.interp) 	}
13183234Ssimon  .hash          : { *(.hash)		}
14280304Sjkim  .dynsym        : { *(.dynsym)		}
15183234Ssimon  .dynstr        : { *(.dynstr)		}
16183234Ssimon  .gnu.version   : { *(.gnu.version)	}
17183234Ssimon  .gnu.version_d   : { *(.gnu.version_d)	}
18183234Ssimon  .gnu.version_r   : { *(.gnu.version_r)	}
19183234Ssimon  .rela.text     :
20183234Ssimon    { *(.rela.text) *(.rela.gnu.linkonce.t*) }
21183234Ssimon  .rela.data     :
22183234Ssimon    { *(.rela.data) *(.rela.gnu.linkonce.d*) }
23183234Ssimon  .rela.rodata   :
24183234Ssimon    { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
25183234Ssimon  .rela.got      : { *(.rela.got)		}
26183234Ssimon  .rela.got1     : { *(.rela.got1)		}
27183234Ssimon  .rela.got2     : { *(.rela.got2)		}
28183234Ssimon  .rela.ctors    : { *(.rela.ctors)	}
29183234Ssimon  .rela.dtors    : { *(.rela.dtors)	}
30183234Ssimon  .rela.init     : { *(.rela.init)	}
31183234Ssimon  .rela.fini     : { *(.rela.fini)	}
32183234Ssimon  .rela.bss      : { *(.rela.bss)		}
33183234Ssimon  .rela.plt      : { *(.rela.plt)		}
34183234Ssimon  .rela.sdata    : { *(.rela.sdata)		}
35183234Ssimon  .rela.sbss     : { *(.rela.sbss)		}
36183234Ssimon  .rela.sdata2   : { *(.rela.sdata2)		}
37183234Ssimon  .rela.sbss2    : { *(.rela.sbss2)		}
38183234Ssimon  .text      :
39183234Ssimon  {
40183234Ssimon    *(.text)
41183234Ssimon    /* .gnu.warning sections are handled specially by elf32.em.  */
42183234Ssimon    *(.gnu.warning)
43183234Ssimon    *(.gnu.linkonce.t*)
44183234Ssimon  } =0
45183234Ssimon  _etext = .;
46183234Ssimon  PROVIDE (etext = .);
47183234Ssimon  .init      : { *(.init)    } =0
48183234Ssimon  .fini      : { *(.fini)    } =0
49183234Ssimon  .rodata    : { *(.rodata) *(.gnu.linkonce.r*) }
50183234Ssimon  .rodata1   : { *(.rodata1) }
51183234Ssimon  .sdata2    : { *(.sdata2)  }
52183234Ssimon  .sbss2     : { *(.sbss2)   }
53183234Ssimon  /* Adjust the address for the data segment to the next page up. */
54183234Ssimon  . = ((. + 0x1000) & ~(0x1000 - 1));
55183234Ssimon  .data    :
56280304Sjkim  {
57183234Ssimon    *(.data)
58280304Sjkim    *(.gnu.linkonce.d*)
59183234Ssimon    CONSTRUCTORS
60280304Sjkim  }
61280304Sjkim  .data1   : { *(.data1) }
62280304Sjkim  .got1           : { *(.got1) }
63183234Ssimon  .dynamic        : { *(.dynamic) }
64183234Ssimon  /* Put .ctors and .dtors next to the .got2 section, so that the pointers
65183234Ssimon     get relocated with -mrelocatable. Also put in the .fixup pointers.
66183234Ssimon     The current compiler no longer needs this, but keep it around for 2.7.2  */
67183234Ssimon                PROVIDE (_GOT2_START_ = .);
68183234Ssimon  .got2           :  { *(.got2) }
69183234Ssimon                PROVIDE (__CTOR_LIST__ = .);
70183234Ssimon  .ctors          : { *(.ctors) }
71183234Ssimon                PROVIDE (__CTOR_END__ = .);
72183234Ssimon                PROVIDE (__DTOR_LIST__ = .);
73183234Ssimon  .dtors          : { *(.dtors) }
74183234Ssimon                PROVIDE (__DTOR_END__ = .);
75183234Ssimon                PROVIDE (_FIXUP_START_ = .);
76183234Ssimon  .fixup          : { *(.fixup) }
77183234Ssimon                PROVIDE (_FIXUP_END_ = .);
78238405Sjkim                PROVIDE (_GOT2_END_ = .);
79238405Sjkim                PROVIDE (_GOT_START_ = .);
80238405Sjkim  .got            : { *(.got) }
81183234Ssimon  .got.plt        : { *(.got.plt) }
82280304Sjkim                PROVIDE (_GOT_END_ = .);
83280304Sjkim  /* We want the small data sections together, so single-instruction offsets
84183234Ssimon     can access them all, and initialized data all before uninitialized, so
85280304Sjkim     we can shorten the on-disk segment size.  */
86280304Sjkim  .sdata     : { *(.sdata) }
87280304Sjkim  _edata  =  .;
88280304Sjkim  PROVIDE (edata = .);
89280304Sjkim  .sbss      :
90183234Ssimon  {
91183234Ssimon    PROVIDE (__sbss_start = .);
92183234Ssimon    *(.sbss)
93280304Sjkim    *(.scommon)
94280304Sjkim    *(.dynsbss)
95280304Sjkim    PROVIDE (__sbss_end = .);
96280304Sjkim  }
97280304Sjkim  .plt   : { *(.plt) }
98280304Sjkim  .bss       :
99280304Sjkim  {
100280304Sjkim   PROVIDE (__bss_start = .);
101280304Sjkim   *(.dynbss)
102280304Sjkim   *(.bss)
103280304Sjkim   *(COMMON)
104280304Sjkim  }
105280304Sjkim  _end = . ;
106280304Sjkim  PROVIDE (end = .);
107280304Sjkim  /* Stabs debugging sections.  */
108280304Sjkim  .stab 0 : { *(.stab) }
109280304Sjkim  .stabstr 0 : { *(.stabstr) }
110280304Sjkim  /* DWARF debug sections.
111280304Sjkim     Symbols in the DWARF debugging sections are relative to the beginning
112280304Sjkim     of the section so we begin them at 0.  */
113280304Sjkim  /* DWARF 1 */
114183234Ssimon  .debug          0 : { *(.debug) }
115183234Ssimon  .line           0 : { *(.line) }
116183234Ssimon  /* GNU DWARF 1 extensions */
117183234Ssimon  .debug_srcinfo  0 : { *(.debug_srcinfo) }
118183234Ssimon  .debug_sfnames  0 : { *(.debug_sfnames) }
119183234Ssimon  /* DWARF 1.1 and DWARF 2 */
120183234Ssimon  .debug_aranges  0 : { *(.debug_aranges) }
121183234Ssimon  .debug_pubnames 0 : { *(.debug_pubnames) }
122183234Ssimon  /* DWARF 2 */
123183234Ssimon  .debug_info     0 : { *(.debug_info) }
124280304Sjkim  .debug_abbrev   0 : { *(.debug_abbrev) }
125183234Ssimon  .debug_line     0 : { *(.debug_line) }
126280304Sjkim  .debug_frame    0 : { *(.debug_frame) }
127238405Sjkim  .debug_str      0 : { *(.debug_str) }
128183234Ssimon  .debug_loc      0 : { *(.debug_loc) }
129183234Ssimon  .debug_macinfo  0 : { *(.debug_macinfo) }
130183234Ssimon  /* SGI/MIPS DWARF 2 extensions */
131238405Sjkim  .debug_weaknames 0 : { *(.debug_weaknames) }
132238405Sjkim  .debug_funcnames 0 : { *(.debug_funcnames) }
133280304Sjkim  .debug_typenames 0 : { *(.debug_typenames) }
134280304Sjkim  .debug_varnames  0 : { *(.debug_varnames) }
135183234Ssimon  /* These must appear regardless of  .  */
136183234Ssimon}
137183234Ssimon
138280304Sjkim