]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/conf/ldscript.powerpc64le
zfs: merge openzfs/zfs@a4bf6baae
[FreeBSD/FreeBSD.git] / sys / conf / ldscript.powerpc64le
1
2 OUTPUT_FORMAT("elf64-powerpcle-freebsd", "elf64-powerpcle-freebsd",
3               "elf64-powerpcle-freebsd")
4 OUTPUT_ARCH(powerpc:common64)
5 ENTRY(__start)
6 SEARCH_DIR(/usr/lib);
7 PROVIDE (__stack = 0);
8 PHDRS
9 {
10         text PT_LOAD ;
11         dynamic PT_DYNAMIC ;
12 }
13 SECTIONS
14 {
15
16   /* Low-address wrapper for bootloaders (kexec/kboot) that can't parse ELF */
17   . = kernbase - 0x100;
18   .kboot : { *(.text.kboot) } :text
19
20   /* Read-only sections, merged into text segment: */
21   . = kernbase;
22   PROVIDE (begin = .);
23
24   .text      :
25   {
26     *(.glink)
27     *(.text)
28     *(.stub)
29     /* .gnu.warning sections are handled specially by elf32.em.  */
30     *(.gnu.warning)
31     *(.gnu.linkonce.t*)
32   } =0
33   _etext = .;
34   PROVIDE (etext = .);
35
36   /* Do not emit PT_INTERP section, which confuses some loaders (kexec-lite) */
37   /DISCARD/   : { *(.interp)    } 
38
39   /* Also delete notes */
40   /DISCARD/   : { *(.note.*)    } 
41
42   .hash          : { *(.hash)           }
43   .dynsym        : { *(.dynsym)         }
44   .dynstr        : { *(.dynstr)         }
45   .gnu.version   : { *(.gnu.version)    }
46   .gnu.version_d   : { *(.gnu.version_d)        }
47   .gnu.version_r   : { *(.gnu.version_r)        }
48   .note.gnu.build-id : {
49     PROVIDE (__build_id_start = .);
50     *(.note.gnu.build-id)
51     PROVIDE (__build_id_end = .);
52   }
53   .rela.text     :
54     { *(.rela.text) *(.rela.gnu.linkonce.t*) }
55   .rela.data     :
56     { *(.rela.data) *(.rela.gnu.linkonce.d*) }
57   .rela.rodata   :
58     { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
59   .rela.got      : { *(.rela.got)               }
60   .rela.got1     : { *(.rela.got1)              }
61   .rela.got2     : { *(.rela.got2)              }
62   .rela.ctors    : { *(.rela.ctors)     }
63   .rela.dtors    : { *(.rela.dtors)     }
64   .rela.init     : { *(.rela.init)      }
65   .rela.fini     : { *(.rela.fini)      }
66   .rela.bss      : { *(.rela.bss)               }
67   .rela.plt      : { *(.rela.plt)               }
68   .rela.sdata    : { *(.rela.sdata)             }
69   .rela.sbss     : { *(.rela.sbss)              }
70   .rela.sdata2   : { *(.rela.sdata2)            }
71   .rela.sbss2    : { *(.rela.sbss2)             }
72
73   .init      : { *(.init)    } =0
74   .fini      : { *(.fini)    } =0
75   .rodata    : { *(.rodata) *(.gnu.linkonce.r*) }
76   .rodata1   : { *(.rodata1) }
77   .sdata2    : { *(.sdata2)  }
78   .sbss2     : { *(.sbss2)   }
79   /* Adjust the address for the data segment to the next page up. */
80   . = ALIGN(4096);
81   .data.read_frequently :
82   {
83     *(SORT_BY_ALIGNMENT(.data.read_frequently))
84   }
85   .data.read_mostly :
86   {
87     *(.data.read_mostly)
88   }
89   . = ALIGN(128);
90   .data.exclusive_cache_line :
91   {
92     *(.data.exclusive_cache_line)
93   }
94   . = ALIGN(128);
95   .data    :
96   {
97     *(.data)
98     *(.gnu.linkonce.d*)
99   }
100   .data1     : { *(.data1) }
101   .toc1      : ALIGN(8) { *(.toc1) }
102   .opd       : ALIGN(8) { KEEP (*(.opd)) }
103   .branch_lt : ALIGN(8) { *(.branch_lt) }
104   . = ALIGN(4096);
105   .got       : ALIGN(8) { __tocbase = .; *(.got) }
106   .toc       : ALIGN(8) { *(.toc) }
107
108   .dynamic        : { *(.dynamic) } :text :dynamic
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) }
114                 PROVIDE (__CTOR_LIST__ = .);
115   .ctors          : { *(.ctors) }
116                 PROVIDE (__CTOR_END__ = .);
117                 PROVIDE (__DTOR_LIST__ = .);
118   .dtors          : { *(.dtors) }
119                 PROVIDE (__DTOR_END__ = .);
120                 PROVIDE (_FIXUP_START_ = .);
121   .fixup          : { *(.fixup) }
122                 PROVIDE (_FIXUP_END_ = .);
123                 PROVIDE (_GOT2_END_ = .);
124   /* We want the small data sections together, so single-instruction offsets
125      can access them all, and initialized data all before uninitialized, so
126      we can shorten the on-disk segment size.  */
127   .sdata     : { *(.sdata) }
128   _edata  =  .;
129   PROVIDE (edata = .);
130   .sbss      :
131   {
132     PROVIDE (__sbss_start = .);
133     *(.sbss)
134     *(.scommon)
135     *(.dynsbss)
136     PROVIDE (__sbss_end = .);
137   }
138   .plt   : { *(.plt) }
139   .iplt  : { *(.iplt) }
140   .bss       :
141   {
142    PROVIDE (__bss_start = .);
143    *(.dynbss)
144    *(.bss)
145    *(COMMON)
146   }
147   _end = . ;
148   PROVIDE (end = .);
149   /* Stabs debugging sections.  */
150   .stab 0 : { *(.stab) }
151   .stabstr 0 : { *(.stabstr) }
152   /* DWARF debug sections.
153      Symbols in the DWARF debugging sections are relative to the beginning
154      of the section so we begin them at 0.  */
155   /* DWARF 1 */
156   .debug          0 : { *(.debug) }
157   .line           0 : { *(.line) }
158   /* GNU DWARF 1 extensions */
159   .debug_srcinfo  0 : { *(.debug_srcinfo) }
160   .debug_sfnames  0 : { *(.debug_sfnames) }
161   /* DWARF 1.1 and DWARF 2 */
162   .debug_aranges  0 : { *(.debug_aranges) }
163   .debug_pubnames 0 : { *(.debug_pubnames) }
164   /* DWARF 2 */
165   .debug_info     0 : { *(.debug_info) }
166   .debug_abbrev   0 : { *(.debug_abbrev) }
167   .debug_line     0 : { *(.debug_line) }
168   .debug_frame    0 : { *(.debug_frame) }
169   .debug_str      0 : { *(.debug_str) }
170   .debug_loc      0 : { *(.debug_loc) }
171   .debug_macinfo  0 : { *(.debug_macinfo) }
172   /* SGI/MIPS DWARF 2 extensions */
173   .debug_weaknames 0 : { *(.debug_weaknames) }
174   .debug_funcnames 0 : { *(.debug_funcnames) }
175   .debug_typenames 0 : { *(.debug_typenames) }
176   .debug_varnames  0 : { *(.debug_varnames) }
177   /* These must appear regardless of  .  */
178 }
179