xref: /freebsd/sys/conf/ldscript.powerpc (revision e12ff891366cf94db4bfe4c2c810b26a5531053d)
1/* $FreeBSD$ */
2
3OUTPUT_FORMAT("elf32-powerpc-freebsd", "elf32-powerpc-freebsd",
4	      "elf32-powerpc-freebsd")
5OUTPUT_ARCH(powerpc)
6ENTRY(__start)
7SEARCH_DIR(/usr/lib);
8PROVIDE (__stack = 0);
9SECTIONS
10{
11  /* Read-only sections, merged into text segment: */
12
13  . = kernbase + SIZEOF_HEADERS;
14  PROVIDE (begin = . - SIZEOF_HEADERS);
15
16  .text      :
17  {
18    *(.text)
19    *(.stub)
20    /* .gnu.warning sections are handled specially by elf32.em.  */
21    *(.gnu.warning)
22    *(.gnu.linkonce.t*)
23  } =0
24  _etext = .;
25  PROVIDE (etext = .);
26
27  .interp     : { *(.interp) 	}
28  .hash          : { *(.hash)		}
29  .dynsym        : { *(.dynsym)		}
30  .dynstr        : { *(.dynstr)		}
31  .gnu.version   : { *(.gnu.version)	}
32  .gnu.version_d   : { *(.gnu.version_d)	}
33  .gnu.version_r   : { *(.gnu.version_r)	}
34  .rela.text     :
35    { *(.rela.text) *(.rela.gnu.linkonce.t*) }
36  .rela.data     :
37    { *(.rela.data) *(.rela.gnu.linkonce.d*) }
38  .rela.rodata   :
39    { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
40  .rela.got      : { *(.rela.got)		}
41  .rela.got1     : { *(.rela.got1)		}
42  .rela.got2     : { *(.rela.got2)		}
43  .rela.ctors    : { *(.rela.ctors)	}
44  .rela.dtors    : { *(.rela.dtors)	}
45  .rela.init     : { *(.rela.init)	}
46  .rela.fini     : { *(.rela.fini)	}
47  .rela.bss      : { *(.rela.bss)		}
48  .rela.plt      : { *(.rela.plt)		}
49  .rela.sdata    : { *(.rela.sdata)		}
50  .rela.sbss     : { *(.rela.sbss)		}
51  .rela.sdata2   : { *(.rela.sdata2)		}
52  .rela.sbss2    : { *(.rela.sbss2)		}
53
54  .init      : { *(.init)    } =0
55  .fini      : { *(.fini)    } =0
56  .rodata    : { *(.rodata) *(.gnu.linkonce.r*) }
57  .rodata1   : { *(.rodata1) }
58  .note.gnu.build-id : {
59    PROVIDE (__build_id_start = .);
60    *(.note.gnu.build-id)
61    PROVIDE (__build_id_end = .);
62  }
63  .sdata2    : { *(.sdata2)  }
64  .sbss2     : { *(.sbss2)   }
65  /* Adjust the address for the data segment to the next page up. */
66  . = ((. + 0x1000) & ~(0x1000 - 1));
67  .data    :
68  {
69    *(.data)
70    *(.gnu.linkonce.d*)
71  }
72  .data1   : { *(.data1) }
73  .got1           : { *(.got1) }
74  .dynamic        : { *(.dynamic) }
75  /* Put .ctors and .dtors next to the .got2 section, so that the pointers
76     get relocated with -mrelocatable. Also put in the .fixup pointers.
77     The current compiler no longer needs this, but keep it around for 2.7.2  */
78                PROVIDE (_GOT2_START_ = .);
79  .got2           :  { *(.got2) }
80                PROVIDE (__CTOR_LIST__ = .);
81  .ctors          : { *(.ctors) }
82                PROVIDE (__CTOR_END__ = .);
83                PROVIDE (__DTOR_LIST__ = .);
84  .dtors          : { *(.dtors) }
85                PROVIDE (__DTOR_END__ = .);
86                PROVIDE (_FIXUP_START_ = .);
87  .fixup          : { *(.fixup) }
88                PROVIDE (_FIXUP_END_ = .);
89                PROVIDE (_GOT2_END_ = .);
90                PROVIDE (_GOT_START_ = .);
91  .got            : { *(.got) }
92  .got.plt        : { *(.got.plt) }
93                PROVIDE (_GOT_END_ = .);
94  /* We want the small data sections together, so single-instruction offsets
95     can access them all, and initialized data all before uninitialized, so
96     we can shorten the on-disk segment size.  */
97  .sdata     : { *(.sdata) }
98  _edata  =  .;
99  PROVIDE (edata = .);
100  .sbss      :
101  {
102    PROVIDE (__sbss_start = .);
103    *(.sbss)
104    *(.scommon)
105    *(.dynsbss)
106    PROVIDE (__sbss_end = .);
107  }
108  .plt   : { *(.plt) }
109  .bss       :
110  {
111   PROVIDE (__bss_start = .);
112   *(.dynbss)
113   *(.bss)
114   *(COMMON)
115  }
116  _end = . ;
117  PROVIDE (end = .);
118  /* Stabs debugging sections.  */
119  .stab 0 : { *(.stab) }
120  .stabstr 0 : { *(.stabstr) }
121  /* DWARF debug sections.
122     Symbols in the DWARF debugging sections are relative to the beginning
123     of the section so we begin them at 0.  */
124  /* DWARF 1 */
125  .debug          0 : { *(.debug) }
126  .line           0 : { *(.line) }
127  /* GNU DWARF 1 extensions */
128  .debug_srcinfo  0 : { *(.debug_srcinfo) }
129  .debug_sfnames  0 : { *(.debug_sfnames) }
130  /* DWARF 1.1 and DWARF 2 */
131  .debug_aranges  0 : { *(.debug_aranges) }
132  .debug_pubnames 0 : { *(.debug_pubnames) }
133  /* DWARF 2 */
134  .debug_info     0 : { *(.debug_info) }
135  .debug_abbrev   0 : { *(.debug_abbrev) }
136  .debug_line     0 : { *(.debug_line) }
137  .debug_frame    0 : { *(.debug_frame) }
138  .debug_str      0 : { *(.debug_str) }
139  .debug_loc      0 : { *(.debug_loc) }
140  .debug_macinfo  0 : { *(.debug_macinfo) }
141  /* SGI/MIPS DWARF 2 extensions */
142  .debug_weaknames 0 : { *(.debug_weaknames) }
143  .debug_funcnames 0 : { *(.debug_funcnames) }
144  .debug_typenames 0 : { *(.debug_typenames) }
145  .debug_varnames  0 : { *(.debug_varnames) }
146  /* These must appear regardless of  .  */
147}
148
149