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