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