ldscript.arm revision 245675
1129199Scognet/* $FreeBSD: head/sys/conf/ldscript.arm 245675 2013-01-19 22:08:16Z andrew $ */
2129199ScognetOUTPUT_ARCH(arm)
3129199ScognetENTRY(_start)
4129199Scognet
5129199ScognetSEARCH_DIR(/usr/lib);
6129199ScognetSECTIONS
7129199Scognet{
8129199Scognet  /* Read-only sections, merged into text segment: */
9135672Scognet  . = KERNVIRTADDR + SIZEOF_HEADERS;
10152742Scognet  .text      :
11152742Scognet  {
12152742Scognet    *(.text)
13152742Scognet    *(.stub)
14152742Scognet    /* .gnu.warning sections are handled specially by elf32.em.  */
15152742Scognet    *(.gnu.warning)
16152742Scognet    *(.gnu.linkonce.t*)
17152742Scognet  } =0x9090
18152742Scognet  _etext = .;
19152742Scognet  PROVIDE (etext = .);
20152742Scognet  .fini      : { *(.fini)    } =0x9090
21152742Scognet  .rodata    : { *(.rodata) *(.gnu.linkonce.r*) }
22152742Scognet  .rodata1   : { *(.rodata1) }
23152742Scognet   .interp     : { *(.interp) 	}
24129199Scognet  .hash          : { *(.hash)		}
25129199Scognet  .dynsym        : { *(.dynsym)		}
26129199Scognet  .dynstr        : { *(.dynstr)		}
27129199Scognet  .gnu.version   : { *(.gnu.version)	}
28129199Scognet  .gnu.version_d   : { *(.gnu.version_d)	}
29129199Scognet  .gnu.version_r   : { *(.gnu.version_r)	}
30129199Scognet  .rel.text      :
31129199Scognet    { *(.rel.text) *(.rel.gnu.linkonce.t*) }
32129199Scognet  .rela.text     :
33129199Scognet    { *(.rela.text) *(.rela.gnu.linkonce.t*) }
34129199Scognet  .rel.data      :
35129199Scognet    { *(.rel.data) *(.rel.gnu.linkonce.d*) }
36129199Scognet  .rela.data     :
37129199Scognet    { *(.rela.data) *(.rela.gnu.linkonce.d*) }
38129199Scognet  .rel.rodata    :
39129199Scognet    { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
40129199Scognet  .rela.rodata   :
41129199Scognet    { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
42129199Scognet  .rel.got       : { *(.rel.got)		}
43129199Scognet  .rela.got      : { *(.rela.got)		}
44129199Scognet  .rel.ctors     : { *(.rel.ctors)	}
45129199Scognet  .rela.ctors    : { *(.rela.ctors)	}
46129199Scognet  .rel.dtors     : { *(.rel.dtors)	}
47129199Scognet  .rela.dtors    : { *(.rela.dtors)	}
48129199Scognet  .rel.init      : { *(.rel.init)	}
49129199Scognet  .rela.init     : { *(.rela.init)	}
50129199Scognet  .rel.fini      : { *(.rel.fini)	}
51129199Scognet  .rela.fini     : { *(.rela.fini)	}
52129199Scognet  .rel.bss       : { *(.rel.bss)		}
53129199Scognet  .rela.bss      : { *(.rela.bss)		}
54129199Scognet  .rel.plt       : { *(.rel.plt)		}
55129199Scognet  .rela.plt      : { *(.rela.plt)		}
56129199Scognet  .init          : { *(.init)	} =0x9090
57129199Scognet  .plt      : { *(.plt)	}
58152742Scognet
59245675Sandrew  _extab_start = .;
60245675Sandrew  PROVIDE(extab_start = .);
61245675Sandrew  .ARM.extab : { *(.ARM.extab) }
62245675Sandrew  _extab.end = .;
63245675Sandrew  PROVIDE(extab_end = .);
64245675Sandrew
65245675Sandrew  _exidx_start = .;
66245675Sandrew  PROVIDE(exidx_start = .);
67245675Sandrew  .ARM.exidx : { *(.ARM.exidx) }
68245675Sandrew  _exidx_end = .;
69245675Sandrew  PROVIDE(exidx_end = .);
70245675Sandrew
71129199Scognet  /* Adjust the address for the data segment.  We want to adjust up to
72129199Scognet     the same address within the page on the next page up.  */
73129199Scognet  . = ALIGN(0x1000) + (. & (0x1000 - 1)) ; 
74129199Scognet  .data    :
75129199Scognet  {
76129199Scognet    *(.data)
77129199Scognet    *(.gnu.linkonce.d*)
78129199Scognet    CONSTRUCTORS
79129199Scognet  }
80129199Scognet  .data1   : { *(.data1) }
81129199Scognet  . = ALIGN(32 / 8);
82129199Scognet  _start_ctors = .;
83129199Scognet  PROVIDE (start_ctors = .);
84129199Scognet  .ctors         :
85129199Scognet  {
86129199Scognet    *(.ctors)
87129199Scognet  }
88129199Scognet  _stop_ctors = .;
89129199Scognet  PROVIDE (stop_ctors = .);
90129199Scognet  .dtors         :
91129199Scognet  {
92129199Scognet    *(.dtors)
93129199Scognet  }
94129199Scognet  .got           : { *(.got.plt) *(.got) }
95129199Scognet  .dynamic       : { *(.dynamic) }
96129199Scognet  /* We want the small data sections together, so single-instruction offsets
97129199Scognet     can access them all, and initialized data all before uninitialized, so
98129199Scognet     we can shorten the on-disk segment size.  */
99129199Scognet  .sdata     : { *(.sdata) }
100129199Scognet  _edata  =  .;
101129199Scognet  PROVIDE (edata = .);
102129199Scognet  __bss_start = .;
103129199Scognet  .sbss      : { *(.sbss) *(.scommon) }
104129199Scognet  .bss       :
105129199Scognet  {
106129199Scognet   *(.dynbss)
107129199Scognet   *(.bss)
108129199Scognet   *(COMMON)
109129199Scognet  }
110129199Scognet  . = ALIGN(32 / 8);
111129199Scognet  _end = . ;
112129199Scognet  PROVIDE (end = .);
113129199Scognet  /* Stabs debugging sections.  */
114129199Scognet  .stab 0 : { *(.stab) }
115129199Scognet  .stabstr 0 : { *(.stabstr) }
116129199Scognet  .stab.excl 0 : { *(.stab.excl) }
117129199Scognet  .stab.exclstr 0 : { *(.stab.exclstr) }
118129199Scognet  .stab.index 0 : { *(.stab.index) }
119129199Scognet  .stab.indexstr 0 : { *(.stab.indexstr) }
120129199Scognet  .comment 0 : { *(.comment) }
121129199Scognet  /* DWARF debug sections.
122129199Scognet     Symbols in the DWARF debugging sections are relative to the beginning
123129199Scognet     of the section so we begin them at 0.  */
124129199Scognet  /* DWARF 1 */
125129199Scognet  .debug          0 : { *(.debug) }
126129199Scognet  .line           0 : { *(.line) }
127129199Scognet  /* GNU DWARF 1 extensions */
128129199Scognet  .debug_srcinfo  0 : { *(.debug_srcinfo) }
129129199Scognet  .debug_sfnames  0 : { *(.debug_sfnames) }
130129199Scognet  /* DWARF 1.1 and DWARF 2 */
131129199Scognet  .debug_aranges  0 : { *(.debug_aranges) }
132129199Scognet  .debug_pubnames 0 : { *(.debug_pubnames) }
133129199Scognet  /* DWARF 2 */
134129199Scognet  .debug_info     0 : { *(.debug_info) }
135129199Scognet  .debug_abbrev   0 : { *(.debug_abbrev) }
136129199Scognet  .debug_line     0 : { *(.debug_line) }
137129199Scognet  .debug_frame    0 : { *(.debug_frame) }
138129199Scognet  .debug_str      0 : { *(.debug_str) }
139129199Scognet  .debug_loc      0 : { *(.debug_loc) }
140129199Scognet  .debug_macinfo  0 : { *(.debug_macinfo) }
141129199Scognet  /* SGI/MIPS DWARF 2 extensions */
142129199Scognet  .debug_weaknames 0 : { *(.debug_weaknames) }
143129199Scognet  .debug_funcnames 0 : { *(.debug_funcnames) }
144129199Scognet  .debug_typenames 0 : { *(.debug_typenames) }
145129199Scognet  .debug_varnames  0 : { *(.debug_varnames) }
146129199Scognet  /* These must appear regardless of  .  */
147129199Scognet}
148