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