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