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