Rename remaining members of buildsym_compunit to start with "m_"
[deliverable/binutils-gdb.git] / ld / scripttempl / arclinux.sc
CommitLineData
219d1afa 1# Copyright (C) 2014-2018 Free Software Foundation, Inc.
c0913ebf
CZ
2#
3# Copying and distribution of this file, with or without modification,
4# are permitted in any medium without royalty provided the copyright
5# notice and this notice are preserved.
886a2506
NC
6#
7# Unusual variables checked by this code:
c0913ebf 8# NOP - four byte opcode for no-op (defaults to none)
886a2506
NC
9# NO_SMALL_DATA - no .sbss/.sbss2/.sdata/.sdata2 sections if not
10# empty.
c0913ebf
CZ
11# SMALL_DATA_CTOR - .ctors contains small data.
12# SMALL_DATA_DTOR - .dtors contains small data.
886a2506
NC
13# DATA_ADDR - if end-of-text-plus-one-page isn't right for data start
14# INITIAL_READONLY_SECTIONS - at start of text segment
15# OTHER_READONLY_SECTIONS - other than .text .init .rodata ...
16# (e.g., .PARISC.milli)
17# OTHER_TEXT_SECTIONS - these get put in .text when relocating
c0913ebf 18# INITIAL_READWRITE_SECTIONS - at start of data segment (after relro)
886a2506
NC
19# OTHER_READWRITE_SECTIONS - other than .data .bss .ctors .sdata ...
20# (e.g., .PARISC.global)
c0913ebf
CZ
21# OTHER_RELRO_SECTIONS - other than .data.rel.ro ...
22# (e.g. PPC32 .fixup, .got[12])
23# OTHER_RELRO_SECTIONS_2 - as above, but after .dynamic in text segment
886a2506 24# OTHER_BSS_SECTIONS - other than .bss .sbss ...
c0913ebf 25# ATTRS_SECTIONS - at the end
886a2506
NC
26# OTHER_SECTIONS - at the end
27# EXECUTABLE_SYMBOLS - symbols that must be defined for an
28# executable (e.g., _DYNAMIC_LINK)
c0913ebf
CZ
29# TEXT_START_ADDR - the first byte of the text segment, after any
30# headers.
31# TEXT_BASE_ADDRESS - the first byte of the text segment.
886a2506
NC
32# TEXT_START_SYMBOLS - symbols that appear at the start of the
33# .text section.
34# DATA_START_SYMBOLS - symbols that appear at the start of the
35# .data section.
c0913ebf
CZ
36# DATA_END_SYMBOLS - symbols that appear at the end of the
37# writeable data sections.
886a2506
NC
38# OTHER_GOT_SYMBOLS - symbols defined just before .got.
39# OTHER_GOT_SECTIONS - sections just after .got.
40# OTHER_SDATA_SECTIONS - sections just after .sdata.
41# OTHER_BSS_SYMBOLS - symbols that appear at the start of the
42# .bss section besides __bss_start.
c0913ebf 43# PLT_NEXT_DATA - .plt next to data segment when .plt is in text segment.
886a2506 44# DATA_PLT - .plt should be in data segment, not text segment.
c0913ebf 45# PLT_BEFORE_GOT - .plt just before .got when .plt is in data segement.
886a2506 46# BSS_PLT - .plt should be in bss segment
c0913ebf
CZ
47# NO_REL_RELOCS - Don't include .rel.* sections in script
48# NO_RELA_RELOCS - Don't include .rela.* sections in script
49# NON_ALLOC_DYN - Place dynamic sections after data segment.
886a2506 50# TEXT_DYNAMIC - .dynamic in text segment, not data segment.
c0913ebf 51# EMBEDDED - whether this is for an embedded system.
886a2506
NC
52# SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
53# start address of shared library.
54# INPUT_FILES - INPUT command of files to always include
55# WRITABLE_RODATA - if set, the .rodata section should be writable
56# INIT_START, INIT_END - statements just before and just after
6c19b93b 57# combination of .init sections.
886a2506 58# FINI_START, FINI_END - statements just before and just after
6c19b93b 59# combination of .fini sections.
886a2506 60# STACK_ADDR - start of a .stack section.
c0913ebf
CZ
61# OTHER_SYMBOLS - symbols to place right at the end of the script.
62# ETEXT_NAME - name of a symbol for the end of the text section,
63# normally etext.
64# SEPARATE_CODE - if set, .text and similar sections containing
65# actual machine instructions must be in wholly disjoint
66# pages from any other data, including headers
67# SEPARATE_GOTPLT - if set, .got.plt should be separate output section,
68# so that .got can be in the RELRO area. It should be set to
69# the number of bytes in the beginning of .got.plt which can be
70# in the RELRO area as well.
71# USER_LABEL_PREFIX - prefix to add to user-visible symbols.
72# RODATA_NAME, SDATA_NAME, SBSS_NAME, BSS_NAME - base parts of names
73# for standard sections, without initial "." or suffixes.
886a2506
NC
74#
75# When adding sections, do note that the names of some sections are used
76# when specifying the start address of the next.
77#
78
79# Many sections come in three flavours. There is the 'real' section,
80# like ".data". Then there are the per-procedure or per-variable
81# sections, generated by -ffunction-sections and -fdata-sections in GCC,
82# and useful for --gc-sections, which for a variable "foo" might be
83# ".data.foo". Then there are the linkonce sections, for which the linker
84# eliminates duplicates, which are named like ".gnu.linkonce.d.foo".
85# The exact correspondences are:
86#
87# Section Linkonce section
88# .text .gnu.linkonce.t.foo
89# .rodata .gnu.linkonce.r.foo
90# .data .gnu.linkonce.d.foo
91# .bss .gnu.linkonce.b.foo
92# .sdata .gnu.linkonce.s.foo
93# .sbss .gnu.linkonce.sb.foo
94# .sdata2 .gnu.linkonce.s2.foo
95# .sbss2 .gnu.linkonce.sb2.foo
96# .debug_info .gnu.linkonce.wi.foo
97# .tdata .gnu.linkonce.td.foo
98# .tbss .gnu.linkonce.tb.foo
c0913ebf
CZ
99# .lrodata .gnu.linkonce.lr.foo
100# .ldata .gnu.linkonce.l.foo
101# .lbss .gnu.linkonce.lb.foo
886a2506
NC
102#
103# Each of these can also have corresponding .rel.* and .rela.* sections.
104
c0913ebf
CZ
105if test -n "$NOP"; then
106 FILL="=$NOP"
107else
108 FILL=
109fi
110
111test -z "$RODATA_NAME" && RODATA_NAME=rodata
112test -z "$SDATA_NAME" && SDATA_NAME=sdata
113test -z "$SBSS_NAME" && SBSS_NAME=sbss
114test -z "$BSS_NAME" && BSS_NAME=bss
115test -z "$ENTRY" && ENTRY=${USER_LABEL_PREFIX}_start
886a2506
NC
116test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT}
117test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
886a2506
NC
118if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi
119test -z "${ELFSIZE}" && ELFSIZE=32
120test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8"
121test "$LD_FLAG" = "N" && DATA_ADDR=.
c0913ebf 122test -z "${ETEXT_NAME}" && ETEXT_NAME=${USER_LABEL_PREFIX}etext
886a2506
NC
123test -n "$CREATE_SHLIB$CREATE_PIE" && test -n "$SHLIB_DATA_ADDR" && COMMONPAGESIZE=""
124test -z "$CREATE_SHLIB$CREATE_PIE" && test -n "$DATA_ADDR" && COMMONPAGESIZE=""
c0913ebf
CZ
125test -n "$RELRO_NOW" && unset SEPARATE_GOTPLT
126test -z "$ATTRS_SECTIONS" && ATTRS_SECTIONS=".gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }"
886a2506 127DATA_SEGMENT_ALIGN="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))"
c0913ebf 128DATA_SEGMENT_RELRO_END=""
886a2506
NC
129DATA_SEGMENT_END=""
130if test -n "${COMMONPAGESIZE}"; then
c0913ebf
CZ
131 if test "${SEGMENT_SIZE}" != "${MAXPAGESIZE}"; then
132 DATA_SEGMENT_ALIGN="ALIGN (${SEGMENT_SIZE}) - ((${MAXPAGESIZE} - .) & (${MAXPAGESIZE} - 1)); . = DATA_SEGMENT_ALIGN (${MAXPAGESIZE}, ${COMMONPAGESIZE})"
133 else
134 DATA_SEGMENT_ALIGN="DATA_SEGMENT_ALIGN (${MAXPAGESIZE}, ${COMMONPAGESIZE})"
135 fi
886a2506 136 DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);"
c0913ebf
CZ
137 DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
138fi
139if test -z "${INITIAL_READONLY_SECTIONS}${CREATE_SHLIB}"; then
140 INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
141fi
142if test -z "$PLT"; then
143 IPLT=".iplt ${RELOCATING-0} : { *(.iplt) }"
144 PLT=".plt ${RELOCATING-0} : { *(.plt)${IREL_IN_PLT+ *(.iplt)} }
145 ${IREL_IN_PLT-$IPLT}"
146fi
147test -n "${DATA_PLT-${BSS_PLT-text}}" && TEXT_PLT=
148if test -z "$GOT"; then
149 if test -z "$SEPARATE_GOTPLT"; then
150 GOT=".got ${RELOCATING-0} : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) }"
151 else
152 GOT=".got ${RELOCATING-0} : { *(.got) *(.igot) }"
153 GOTPLT=".got.plt ${RELOCATING-0} : { *(.got.plt) *(.igot.plt) }"
154 fi
886a2506 155fi
c0913ebf
CZ
156REL_IFUNC=".rel.ifunc ${RELOCATING-0} : { *(.rel.ifunc) }"
157RELA_IFUNC=".rela.ifunc ${RELOCATING-0} : { *(.rela.ifunc) }"
158REL_IPLT=".rel.iplt ${RELOCATING-0} :
159 {
160 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__rel_iplt_start = .);}}
161 *(.rel.iplt)
162 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__rel_iplt_end = .);}}
163 }"
164RELA_IPLT=".rela.iplt ${RELOCATING-0} :
165 {
166 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__rela_iplt_start = .);}}
167 *(.rela.iplt)
168 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__rela_iplt_end = .);}}
169 }"
886a2506 170DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
c0913ebf
CZ
171RODATA=".${RODATA_NAME} ${RELOCATING-0} : { *(.${RODATA_NAME}${RELOCATING+ .${RODATA_NAME}.* .gnu.linkonce.r.*}) }"
172DATARELRO=".data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }"
173DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }"
886a2506 174if test -z "${NO_SMALL_DATA}"; then
c0913ebf 175 SBSS=".${SBSS_NAME} ${RELOCATING-0} :
886a2506 176 {
c0913ebf
CZ
177 ${RELOCATING+${SBSS_START_SYMBOLS}}
178 ${CREATE_SHLIB+*(.${SBSS_NAME}2 .${SBSS_NAME}2.* .gnu.linkonce.sb2.*)}
179 *(.dyn${SBSS_NAME})
180 *(.${SBSS_NAME}${RELOCATING+ .${SBSS_NAME}.* .gnu.linkonce.sb.*})
886a2506 181 *(.scommon)
c0913ebf 182 ${RELOCATING+${SBSS_END_SYMBOLS}}
886a2506 183 }"
c0913ebf 184 SBSS2=".${SBSS_NAME}2 ${RELOCATING-0} : { *(.${SBSS_NAME}2${RELOCATING+ .${SBSS_NAME}2.* .gnu.linkonce.sb2.*}) }"
886a2506
NC
185 SDATA="/* We want the small data sections together, so single-instruction offsets
186 can access them all, and initialized data all before uninitialized, so
187 we can shorten the on-disk segment size. */
c0913ebf 188 .${SDATA_NAME} ${RELOCATING-0} :
886a2506
NC
189 {
190 ${RELOCATING+${SDATA_START_SYMBOLS}}
c0913ebf
CZ
191 ${CREATE_SHLIB+*(.${SDATA_NAME}2 .${SDATA_NAME}2.* .gnu.linkonce.s2.*)}
192 *(.${SDATA_NAME}${RELOCATING+ .${SDATA_NAME}.* .gnu.linkonce.s.*})
193 }"
194 SDATA2=".${SDATA_NAME}2 ${RELOCATING-0} :
195 {
196 ${RELOCATING+${SDATA2_START_SYMBOLS}}
197 *(.${SDATA_NAME}2${RELOCATING+ .${SDATA_NAME}2.* .gnu.linkonce.s2.*})
198 }"
199 REL_SDATA=".rel.${SDATA_NAME} ${RELOCATING-0} : { *(.rel.${SDATA_NAME}${RELOCATING+ .rel.${SDATA_NAME}.* .rel.gnu.linkonce.s.*}) }
200 .rela.${SDATA_NAME} ${RELOCATING-0} : { *(.rela.${SDATA_NAME}${RELOCATING+ .rela.${SDATA_NAME}.* .rela.gnu.linkonce.s.*}) }"
201 REL_SBSS=".rel.${SBSS_NAME} ${RELOCATING-0} : { *(.rel.${SBSS_NAME}${RELOCATING+ .rel.${SBSS_NAME}.* .rel.gnu.linkonce.sb.*}) }
202 .rela.${SBSS_NAME} ${RELOCATING-0} : { *(.rela.${SBSS_NAME}${RELOCATING+ .rela.${SBSS_NAME}.* .rela.gnu.linkonce.sb.*}) }"
203 REL_SDATA2=".rel.${SDATA_NAME}2 ${RELOCATING-0} : { *(.rel.${SDATA_NAME}2${RELOCATING+ .rel.${SDATA_NAME}2.* .rel.gnu.linkonce.s2.*}) }
204 .rela.${SDATA_NAME}2 ${RELOCATING-0} : { *(.rela.${SDATA_NAME}2${RELOCATING+ .rela.${SDATA_NAME}2.* .rela.gnu.linkonce.s2.*}) }"
205 REL_SBSS2=".rel.${SBSS_NAME}2 ${RELOCATING-0} : { *(.rel.${SBSS_NAME}2${RELOCATING+ .rel.${SBSS_NAME}2.* .rel.gnu.linkonce.sb2.*}) }
206 .rela.${SBSS_NAME}2 ${RELOCATING-0} : { *(.rela.${SBSS_NAME}2${RELOCATING+ .rela.${SBSS_NAME}2.* .rela.gnu.linkonce.sb2.*}) }"
207else
208 NO_SMALL_DATA=" "
209fi
210if test -z "${SDATA_GOT}${DATA_GOT}"; then
211 if test -n "${NO_SMALL_DATA}"; then
212 DATA_GOT=" "
213 fi
214fi
215if test -z "${SDATA_GOT}${DATA_GOT}"; then
216 if test -z "${NO_SMALL_DATA}"; then
217 SDATA_GOT=" "
218 fi
219fi
220test -n "$SEPARATE_GOTPLT" && SEPARATE_GOTPLT=" "
221test "${LARGE_SECTIONS}" = "yes" && REL_LARGE="
222 .rel.ldata ${RELOCATING-0} : { *(.rel.ldata${RELOCATING+ .rel.ldata.* .rel.gnu.linkonce.l.*}) }
223 .rela.ldata ${RELOCATING-0} : { *(.rela.ldata${RELOCATING+ .rela.ldata.* .rela.gnu.linkonce.l.*}) }
224 .rel.lbss ${RELOCATING-0} : { *(.rel.lbss${RELOCATING+ .rel.lbss.* .rel.gnu.linkonce.lb.*}) }
225 .rela.lbss ${RELOCATING-0} : { *(.rela.lbss${RELOCATING+ .rela.lbss.* .rela.gnu.linkonce.lb.*}) }
226 .rel.lrodata ${RELOCATING-0} : { *(.rel.lrodata${RELOCATING+ .rel.lrodata.* .rel.gnu.linkonce.lr.*}) }
227 .rela.lrodata ${RELOCATING-0} : { *(.rela.lrodata${RELOCATING+ .rela.lrodata.* .rela.gnu.linkonce.lr.*}) }"
228test "${LARGE_SECTIONS}" = "yes" && LARGE_BSS="
229 .lbss ${RELOCATING-0} :
230 {
231 *(.dynlbss)
232 *(.lbss${RELOCATING+ .lbss.* .gnu.linkonce.lb.*})
233 *(LARGE_COMMON)
886a2506 234 }"
c0913ebf
CZ
235test "${LARGE_SECTIONS}" = "yes" && LARGE_SECTIONS="
236 .lrodata ${RELOCATING-0} ${RELOCATING+ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))} :
237 {
238 *(.lrodata${RELOCATING+ .lrodata.* .gnu.linkonce.lr.*})
239 }
240 .ldata ${RELOCATING-0} ${RELOCATING+ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))} :
241 {
242 *(.ldata${RELOCATING+ .ldata.* .gnu.linkonce.l.*})
243 ${RELOCATING+. = ALIGN(. != 0 ? ${ALIGNMENT} : 1);}
244 }"
245if test "${ENABLE_INITFINI_ARRAY}" = "yes"; then
246 SORT_INIT_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))"
247 SORT_FINI_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))"
248 CTORS_IN_INIT_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors"
249 DTORS_IN_FINI_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors"
250else
251 SORT_INIT_ARRAY="KEEP (*(SORT(.init_array.*)))"
252 SORT_FINI_ARRAY="KEEP (*(SORT(.fini_array.*)))"
253 CTORS_IN_INIT_ARRAY=
254 DTORS_IN_FINI_ARRAY=
886a2506 255fi
c0913ebf
CZ
256INIT_ARRAY=".init_array ${RELOCATING-0} :
257 {
258 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__init_array_start = .);}}
259 ${SORT_INIT_ARRAY}
260 KEEP (*(.init_array ${CTORS_IN_INIT_ARRAY}))
261 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__init_array_end = .);}}
262 }"
263FINI_ARRAY=".fini_array ${RELOCATING-0} :
264 {
265 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_start = .);}}
266 ${SORT_FINI_ARRAY}
267 KEEP (*(.fini_array ${DTORS_IN_FINI_ARRAY}))
268 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_end = .);}}
269 }"
270CTOR=".ctors ${CONSTRUCTING-0} :
886a2506
NC
271 {
272 ${CONSTRUCTING+${CTOR_START}}
273 /* gcc uses crtbegin.o to find the start of
274 the constructors, so we make sure it is
275 first. Because this is a wildcard, it
276 doesn't matter if the user does not
277 actually link against crtbegin.o; the
278 linker won't look for a file to match a
279 wildcard. The wildcard also means that it
280 doesn't matter which directory crtbegin.o
281 is in. */
282
c0913ebf
CZ
283 KEEP (*crtbegin.o(.ctors))
284 KEEP (*crtbegin?.o(.ctors))
886a2506
NC
285
286 /* We don't want to include the .ctor section from
c0913ebf 287 the crtend.o file until after the sorted ctors.
886a2506
NC
288 The .ctor section from the crtend file contains the
289 end of ctors marker and it must be last */
290
c0913ebf 291 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors))
886a2506
NC
292 KEEP (*(SORT(.ctors.*)))
293 KEEP (*(.ctors))
294 ${CONSTRUCTING+${CTOR_END}}
295 }"
296DTOR=".dtors ${CONSTRUCTING-0} :
297 {
298 ${CONSTRUCTING+${DTOR_START}}
c0913ebf
CZ
299 KEEP (*crtbegin.o(.dtors))
300 KEEP (*crtbegin?.o(.dtors))
301 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors))
886a2506
NC
302 KEEP (*(SORT(.dtors.*)))
303 KEEP (*(.dtors))
304 ${CONSTRUCTING+${DTOR_END}}
305 }"
74dc9032 306STACK=".stack ${RELOCATING-0}${RELOCATING+${STACK_ADDR}} :
886a2506 307 {
c0913ebf 308 ${RELOCATING+${USER_LABEL_PREFIX}_stack = .;}
886a2506 309 *(.stack)
74dc9032 310 ${RELOCATING+${STACK_SENTINEL}}
886a2506
NC
311 }"
312
c0913ebf
CZ
313TEXT_START_ADDR="SEGMENT_START(\"text-segment\", ${TEXT_START_ADDR})"
314SHLIB_TEXT_START_ADDR="SEGMENT_START(\"text-segment\", ${SHLIB_TEXT_START_ADDR:-0})"
315
316if [ -z "$SEPARATE_CODE" ]; then
317 SIZEOF_HEADERS_CODE=" + SIZEOF_HEADERS"
318else
319 SIZEOF_HEADERS_CODE=
320fi
321
322# If this is for an embedded system, don't add SIZEOF_HEADERS.
886a2506 323if [ -z "$EMBEDDED" ]; then
c0913ebf 324 test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR}${SIZEOF_HEADERS_CODE}"
886a2506
NC
325else
326 test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR}"
327fi
328
329cat <<EOF
219d1afa 330/* Copyright (C) 2014-2018 Free Software Foundation, Inc.
c0913ebf
CZ
331
332 Copying and distribution of this script, with or without modification,
333 are permitted in any medium without royalty provided the copyright
334 notice and this notice are preserved. */
335
886a2506
NC
336OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
337 "${LITTLE_OUTPUT_FORMAT}")
338OUTPUT_ARCH(${OUTPUT_ARCH})
339${RELOCATING+ENTRY(${ENTRY})}
340
341${RELOCATING+${LIB_SEARCH_DIRS}}
886a2506
NC
342${RELOCATING+${EXECUTABLE_SYMBOLS}}
343${RELOCATING+${INPUT_FILES}}
344${RELOCATING- /* For some reason, the Solaris linker makes bad executables
345 if gld -r is used and the intermediate file has sections starting
346 at non-zero addresses. Could be a Solaris ld bug, could be a GNU ld
347 bug. But for now assigning the zero vmas works. */}
348
349SECTIONS
350{
351 /* Read-only sections, merged into text segment: */
352 ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (__executable_start = ${TEXT_START_ADDR}); . = ${TEXT_BASE_ADDRESS};}}}
c0913ebf
CZ
353 ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR}${SIZEOF_HEADERS_CODE};}}
354 ${CREATE_PIE+${RELOCATING+PROVIDE (__executable_start = ${SHLIB_TEXT_START_ADDR}); . = ${SHLIB_TEXT_START_ADDR}${SIZEOF_HEADERS_CODE};}}
355EOF
356
357emit_early_ro()
358{
359 cat <<EOF
886a2506 360 ${INITIAL_READONLY_SECTIONS}
c0913ebf
CZ
361 .note.gnu.build-id : { *(.note.gnu.build-id) }
362EOF
363}
364
365test -n "${SEPARATE_CODE}" || emit_early_ro
366
367test -n "${RELOCATING+0}" || unset NON_ALLOC_DYN
368test -z "${NON_ALLOC_DYN}" || TEXT_DYNAMIC=
369cat > ldscripts/dyntmp.$$ <<EOF
886a2506
NC
370 ${TEXT_DYNAMIC+${DYNAMIC}}
371 .hash ${RELOCATING-0} : { *(.hash) }
c0913ebf 372 .gnu.hash ${RELOCATING-0} : { *(.gnu.hash) }
886a2506
NC
373 .dynsym ${RELOCATING-0} : { *(.dynsym) }
374 .dynstr ${RELOCATING-0} : { *(.dynstr) }
375 .gnu.version ${RELOCATING-0} : { *(.gnu.version) }
376 .gnu.version_d ${RELOCATING-0}: { *(.gnu.version_d) }
377 .gnu.version_r ${RELOCATING-0}: { *(.gnu.version_r) }
886a2506 378EOF
c0913ebf 379
886a2506 380if [ "x$COMBRELOC" = x ]; then
c0913ebf 381 COMBRELOCCAT="cat >> ldscripts/dyntmp.$$"
886a2506
NC
382else
383 COMBRELOCCAT="cat > $COMBRELOC"
384fi
385eval $COMBRELOCCAT <<EOF
c0913ebf 386 ${INITIAL_RELOC_SECTIONS}
886a2506
NC
387 .rel.init ${RELOCATING-0} : { *(.rel.init) }
388 .rela.init ${RELOCATING-0} : { *(.rela.init) }
389 .rel.text ${RELOCATING-0} : { *(.rel.text${RELOCATING+ .rel.text.* .rel.gnu.linkonce.t.*}) }
390 .rela.text ${RELOCATING-0} : { *(.rela.text${RELOCATING+ .rela.text.* .rela.gnu.linkonce.t.*}) }
391 .rel.fini ${RELOCATING-0} : { *(.rel.fini) }
392 .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
c0913ebf
CZ
393 .rel.${RODATA_NAME} ${RELOCATING-0} : { *(.rel.${RODATA_NAME}${RELOCATING+ .rel.${RODATA_NAME}.* .rel.gnu.linkonce.r.*}) }
394 .rela.${RODATA_NAME} ${RELOCATING-0} : { *(.rela.${RODATA_NAME}${RELOCATING+ .rela.${RODATA_NAME}.* .rela.gnu.linkonce.r.*}) }
886a2506 395 ${OTHER_READONLY_RELOC_SECTIONS}
c0913ebf
CZ
396 .rel.data.rel.ro ${RELOCATING-0} : { *(.rel.data.rel.ro${RELOCATING+ .rel.data.rel.ro.* .rel.gnu.linkonce.d.rel.ro.*}) }
397 .rela.data.rel.ro ${RELOCATING-0} : { *(.rela.data.rel.ro${RELOCATING+ .rela.data.rel.ro.* .rela.gnu.linkonce.d.rel.ro.*}) }
886a2506
NC
398 .rel.data ${RELOCATING-0} : { *(.rel.data${RELOCATING+ .rel.data.* .rel.gnu.linkonce.d.*}) }
399 .rela.data ${RELOCATING-0} : { *(.rela.data${RELOCATING+ .rela.data.* .rela.gnu.linkonce.d.*}) }
c0913ebf 400 ${OTHER_READWRITE_RELOC_SECTIONS}
886a2506
NC
401 .rel.tdata ${RELOCATING-0} : { *(.rel.tdata${RELOCATING+ .rel.tdata.* .rel.gnu.linkonce.td.*}) }
402 .rela.tdata ${RELOCATING-0} : { *(.rela.tdata${RELOCATING+ .rela.tdata.* .rela.gnu.linkonce.td.*}) }
403 .rel.tbss ${RELOCATING-0} : { *(.rel.tbss${RELOCATING+ .rel.tbss.* .rel.gnu.linkonce.tb.*}) }
404 .rela.tbss ${RELOCATING-0} : { *(.rela.tbss${RELOCATING+ .rela.tbss.* .rela.gnu.linkonce.tb.*}) }
405 .rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
406 .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
407 .rel.dtors ${RELOCATING-0} : { *(.rel.dtors) }
408 .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) }
409 .rel.got ${RELOCATING-0} : { *(.rel.got) }
410 .rela.got ${RELOCATING-0} : { *(.rela.got) }
411 ${OTHER_GOT_RELOC_SECTIONS}
412 ${REL_SDATA}
413 ${REL_SBSS}
414 ${REL_SDATA2}
415 ${REL_SBSS2}
c0913ebf
CZ
416 .rel.${BSS_NAME} ${RELOCATING-0} : { *(.rel.${BSS_NAME}${RELOCATING+ .rel.${BSS_NAME}.* .rel.gnu.linkonce.b.*}) }
417 .rela.${BSS_NAME} ${RELOCATING-0} : { *(.rela.${BSS_NAME}${RELOCATING+ .rela.${BSS_NAME}.* .rela.gnu.linkonce.b.*}) }
418 ${REL_LARGE}
419 ${IREL_IN_PLT+$REL_IFUNC}
420 ${IREL_IN_PLT+$RELA_IFUNC}
421 ${IREL_IN_PLT-$REL_IPLT}
422 ${IREL_IN_PLT-$RELA_IPLT}
886a2506 423EOF
c0913ebf 424
886a2506 425if [ -n "$COMBRELOC" ]; then
c0913ebf 426cat >> ldscripts/dyntmp.$$ <<EOF
886a2506
NC
427 .rel.dyn ${RELOCATING-0} :
428 {
429EOF
6c19b93b 430sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;/__rela_iplt_/d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
c0913ebf 431cat >> ldscripts/dyntmp.$$ <<EOF
886a2506
NC
432 }
433 .rela.dyn ${RELOCATING-0} :
434 {
435EOF
6c19b93b 436sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;/__rel_iplt_/d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
c0913ebf 437cat >> ldscripts/dyntmp.$$ <<EOF
886a2506
NC
438 }
439EOF
440fi
c0913ebf
CZ
441
442cat >> ldscripts/dyntmp.$$ <<EOF
443 .rel.plt ${RELOCATING-0} :
444 {
445 *(.rel.plt)
446 ${IREL_IN_PLT+${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__rel_iplt_start = .);}}}
447 ${IREL_IN_PLT+${RELOCATING+*(.rel.iplt)}}
448 ${IREL_IN_PLT+${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__rel_iplt_end = .);}}}
449 }
450 .rela.plt ${RELOCATING-0} :
451 {
452 *(.rela.plt)
453 ${IREL_IN_PLT+${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__rela_iplt_start = .);}}}
454 ${IREL_IN_PLT+${RELOCATING+*(.rela.iplt)}}
455 ${IREL_IN_PLT+${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__rela_iplt_end = .);}}}
456 }
886a2506 457 ${OTHER_PLT_RELOC_SECTIONS}
c0913ebf
CZ
458EOF
459
460emit_dyn()
461{
462 if test -z "${NO_REL_RELOCS}${NO_RELA_RELOCS}"; then
463 cat ldscripts/dyntmp.$$
464 else
465 if test -z "${NO_REL_RELOCS}"; then
6c19b93b 466 sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d;/^[ ]*\.rela\./d;/__rela_iplt_/d' ldscripts/dyntmp.$$
c0913ebf
CZ
467 fi
468 if test -z "${NO_RELA_RELOCS}"; then
6c19b93b 469 sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d;/^[ ]*\.rel\./d;/__rel_iplt_/d' ldscripts/dyntmp.$$
c0913ebf
CZ
470 fi
471 fi
472 rm -f ldscripts/dyntmp.$$
473}
886a2506 474
c0913ebf
CZ
475test -n "${NON_ALLOC_DYN}${SEPARATE_CODE}" || emit_dyn
476
477cat <<EOF
478 .init ${RELOCATING-0}${RELOCATING+${INIT_ADDR}} :
479 {
886a2506 480 ${RELOCATING+${INIT_START}}
c0913ebf 481 KEEP (*(SORT_NONE(.init)))
886a2506 482 ${RELOCATING+${INIT_END}}
c0913ebf 483 } ${FILL}
886a2506 484
c0913ebf
CZ
485 ${TEXT_PLT+${PLT_NEXT_DATA-${PLT}}}
486 ${TINY_READONLY_SECTION}
886a2506
NC
487 .text ${RELOCATING-0} :
488 {
489 ${RELOCATING+${TEXT_START_SYMBOLS}}
c0913ebf
CZ
490 ${RELOCATING+*(.text.unlikely .text.*_unlikely .text.unlikely.*)}
491 ${RELOCATING+*(.text.exit .text.exit.*)}
492 ${RELOCATING+*(.text.startup .text.startup.*)}
493 ${RELOCATING+*(.text.hot .text.hot.*)}
886a2506
NC
494 *(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
495 /* .gnu.warning sections are handled specially by elf32.em. */
496 *(.gnu.warning)
497 ${RELOCATING+${OTHER_TEXT_SECTIONS}}
c0913ebf
CZ
498 } ${FILL}
499 .fini ${RELOCATING-0}${RELOCATING+${FINI_ADDR}} :
886a2506
NC
500 {
501 ${RELOCATING+${FINI_START}}
c0913ebf 502 KEEP (*(SORT_NONE(.fini)))
886a2506 503 ${RELOCATING+${FINI_END}}
c0913ebf
CZ
504 } ${FILL}
505 ${RELOCATING+PROVIDE (__${ETEXT_NAME} = .);}
506 ${RELOCATING+PROVIDE (_${ETEXT_NAME} = .);}
507 ${RELOCATING+PROVIDE (${ETEXT_NAME} = .);}
508EOF
509
510if test -n "${SEPARATE_CODE}"; then
511 if test -n "${RODATA_ADDR}"; then
512 RODATA_ADDR="\
513SEGMENT_START(\"rodata-segment\", ${RODATA_ADDR}) + SIZEOF_HEADERS"
514 else
515 RODATA_ADDR="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))"
516 RODATA_ADDR="SEGMENT_START(\"rodata-segment\", ${RODATA_ADDR})"
517 fi
518 if test -n "${SHLIB_RODATA_ADDR}"; then
519 SHLIB_RODATA_ADDR="\
520SEGMENT_START(\"rodata-segment\", ${SHLIB_RODATA_ADDR}) + SIZEOF_HEADERS"
521 else
522 SHLIB_RODATA_ADDR="SEGMENT_START(\"rodata-segment\", ${SHLIB_RODATA_ADDR})"
523 SHLIB_RODATA_ADDR="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))"
524 fi
525 cat <<EOF
526 /* Adjust the address for the rodata segment. We want to adjust up to
527 the same address within the page on the next page up. */
528 ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+. = ${RODATA_ADDR};}}}
529 ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_RODATA_ADDR};}}
530 ${CREATE_PIE+${RELOCATING+. = ${SHLIB_RODATA_ADDR};}}
531EOF
532 emit_early_ro
533 emit_dyn
534fi
535
536cat <<EOF
886a2506 537 ${WRITABLE_RODATA-${RODATA}}
c0913ebf 538 .${RODATA_NAME}1 ${RELOCATING-0} : { *(.${RODATA_NAME}1) }
886a2506
NC
539 ${CREATE_SHLIB-${SDATA2}}
540 ${CREATE_SHLIB-${SBSS2}}
541 ${OTHER_READONLY_SECTIONS}
c0913ebf
CZ
542 .eh_frame_hdr : { *(.eh_frame_hdr) ${RELOCATING+*(.eh_frame_entry .eh_frame_entry.*)} }
543 .eh_frame ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.eh_frame)) ${RELOCATING+*(.eh_frame.*)} }
544 .gcc_except_table ${RELOCATING-0} : ONLY_IF_RO { *(.gcc_except_table
545 .gcc_except_table.*) }
546 .gnu_extab ${RELOCATING-0} : ONLY_IF_RO { *(.gnu_extab*) }
547 /* These sections are generated by the Sun/Oracle C++ compiler. */
548 .exception_ranges ${RELOCATING-0} : ONLY_IF_RO { *(.exception_ranges
549 .exception_ranges*) }
550 ${TEXT_PLT+${PLT_NEXT_DATA+${PLT}}}
886a2506
NC
551
552 /* Adjust the address for the data segment. We want to adjust up to
553 the same address within the page on the next page up. */
554 ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+. = ${DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}}
555 ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
556 ${CREATE_PIE+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
557
c0913ebf
CZ
558 /* Exception handling */
559 .eh_frame ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.eh_frame)) ${RELOCATING+*(.eh_frame.*)} }
560 .gnu_extab ${RELOCATING-0} : ONLY_IF_RW { *(.gnu_extab) }
561 .gcc_except_table ${RELOCATING-0} : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
562 .exception_ranges ${RELOCATING-0} : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) }
563
564 /* Thread Local Storage sections */
565 .tdata ${RELOCATING-0} : { PROVIDE_HIDDEN(.tdata = .); *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) }
566 .tbss ${RELOCATING-0} : { PROVIDE_HIDDEN(.tbss = .); *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+ *(.tcommon)} }
886a2506 567
c0913ebf
CZ
568 .preinit_array ${RELOCATING-0} :
569 {
570 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__preinit_array_start = .);}}
571 KEEP (*(.preinit_array))
572 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__preinit_array_end = .);}}
573 }
574 ${RELOCATING+${INIT_ARRAY}}
575 ${RELOCATING+${FINI_ARRAY}}
576 ${SMALL_DATA_CTOR-${RELOCATING+${CTOR}}}
577 ${SMALL_DATA_DTOR-${RELOCATING+${DTOR}}}
578 .jcr ${RELOCATING-0} : { KEEP (*(.jcr)) }
886a2506 579
c0913ebf
CZ
580 ${RELOCATING+${DATARELRO}}
581 ${OTHER_RELRO_SECTIONS}
582 ${TEXT_DYNAMIC-${DYNAMIC}}
583 ${OTHER_RELRO_SECTIONS_2}
584 ${DATA_GOT+${RELRO_NOW+${DATA_PLT+${PLT_BEFORE_GOT+${PLT}}}}}
585 ${DATA_GOT+${RELRO_NOW+${GOT}}}
586 ${DATA_GOT+${RELRO_NOW+${GOTPLT}}}
587 ${DATA_GOT+${RELRO_NOW-${SEPARATE_GOTPLT+${GOT}}}}
588 ${RELOCATING+${DATA_SEGMENT_RELRO_END}}
589 ${INITIAL_READWRITE_SECTIONS}
590 ${DATA_SDATA+${SDATA}}
591 ${DATA_SDATA+${OTHER_SDATA_SECTIONS}}
592 ${DATA_SDATA+${SBSS}}
593 ${DATA_GOT+${RELRO_NOW-${DATA_PLT+${PLT_BEFORE_GOT+${PLT}}}}}
594 ${DATA_GOT+${RELRO_NOW-${SEPARATE_GOTPLT-${GOT}}}}
595 ${DATA_GOT+${RELRO_NOW-${GOTPLT}}}
596
597 ${DATA_PLT+${PLT_BEFORE_GOT-${PLT}}}
886a2506
NC
598
599 .data ${RELOCATING-0} :
600 {
601 ${RELOCATING+${DATA_START_SYMBOLS}}
602 *(.data${RELOCATING+ .data.* .gnu.linkonce.d.*})
603 ${CONSTRUCTING+SORT(CONSTRUCTORS)}
604 }
886a2506 605 .data1 ${RELOCATING-0} : { *(.data1) }
886a2506
NC
606 ${WRITABLE_RODATA+${RODATA}}
607 ${OTHER_READWRITE_SECTIONS}
c0913ebf
CZ
608 ${SMALL_DATA_CTOR+${RELOCATING+${CTOR}}}
609 ${SMALL_DATA_DTOR+${RELOCATING+${DTOR}}}
610 ${SDATA_GOT+${DATA_PLT+${PLT_BEFORE_GOT+${PLT}}}}
611 ${SDATA_GOT+${RELOCATING+${OTHER_GOT_SYMBOLS+. = .; ${OTHER_GOT_SYMBOLS}}}}
612 ${SDATA_GOT+${GOT}}
613 ${SDATA_GOT+${OTHER_GOT_SECTIONS}}
614 ${DATA_SDATA-${SDATA}}
615 ${DATA_SDATA-${OTHER_SDATA_SECTIONS}}
616 ${RELOCATING+${DATA_END_SYMBOLS-${USER_LABEL_PREFIX}_edata = .; PROVIDE (${USER_LABEL_PREFIX}edata = .);}}
617 ${RELOCATING+. = .;}
618 ${RELOCATING+${USER_LABEL_PREFIX}__bss_start = .;}
886a2506 619 ${RELOCATING+${OTHER_BSS_SYMBOLS}}
c0913ebf 620 ${DATA_SDATA-${SBSS}}
886a2506 621 ${BSS_PLT+${PLT}}
c0913ebf 622 .${BSS_NAME} ${RELOCATING-0} :
886a2506 623 {
c0913ebf
CZ
624 *(.dyn${BSS_NAME})
625 *(.${BSS_NAME}${RELOCATING+ .${BSS_NAME}.* .gnu.linkonce.b.*})
886a2506
NC
626 *(COMMON)
627 /* Align here to ensure that the .bss section occupies space up to
628 _end. Align after .bss to ensure correct alignment even if the
c0913ebf
CZ
629 .bss section disappears because there are no input sections.
630 FIXME: Why do we need it? When there is no .bss section, we don't
631 pad the .data section. */
632 ${RELOCATING+. = ALIGN(. != 0 ? ${ALIGNMENT} : 1);}
886a2506
NC
633 }
634 ${OTHER_BSS_SECTIONS}
c0913ebf 635 ${LARGE_BSS_AFTER_BSS+${LARGE_BSS}}
886a2506 636 ${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
c0913ebf
CZ
637 ${RELOCATING+. = ALIGN(${ALIGNMENT});}
638EOF
886a2506 639
c0913ebf
CZ
640LARGE_DATA_ADDR=". = SEGMENT_START(\"ldata-segment\", ${LARGE_DATA_ADDR-.});"
641SHLIB_LARGE_DATA_ADDR=". = SEGMENT_START(\"ldata-segment\", ${SHLIB_LARGE_DATA_ADDR-.});"
886a2506 642
c0913ebf
CZ
643 cat <<EOF
644 ${RELOCATING+${CREATE_SHLIB-${CREATE_PIE-${LARGE_DATA_ADDR}}}}
645 ${RELOCATING+${CREATE_SHLIB+${SHLIB_LARGE_DATA_ADDR}}}
646 ${RELOCATING+${CREATE_PIE+${SHLIB_LARGE_DATA_ADDR}}}
647 ${LARGE_SECTIONS}
648 ${LARGE_BSS_AFTER_BSS-${LARGE_BSS}}
649 ${RELOCATING+. = ALIGN(${ALIGNMENT});}
650 ${RELOCATING+${OTHER_END_SYMBOLS}}
651 ${RELOCATING+${END_SYMBOLS-${USER_LABEL_PREFIX}_end = .; PROVIDE (${USER_LABEL_PREFIX}end = .);}}
652 ${RELOCATING+${DATA_SEGMENT_END}}
74dc9032
AM
653 ${TINY_DATA_SECTION}
654 ${TINY_BSS_SECTION}
655 ${STACK_ADDR+${STACK}}
c0913ebf
CZ
656EOF
657
658test -z "${NON_ALLOC_DYN}" || emit_dyn
886a2506 659
c0913ebf 660cat <<EOF
886a2506
NC
661 /* Stabs debugging sections. */
662 .stab 0 : { *(.stab) }
663 .stabstr 0 : { *(.stabstr) }
664 .stab.excl 0 : { *(.stab.excl) }
665 .stab.exclstr 0 : { *(.stab.exclstr) }
666 .stab.index 0 : { *(.stab.index) }
667 .stab.indexstr 0 : { *(.stab.indexstr) }
668
669 .comment 0 : { *(.comment) }
670
c0913ebf 671EOF
886a2506 672
c0913ebf 673. $srcdir/scripttempl/DWARF.sc
886a2506 674
c0913ebf 675cat <<EOF
c0913ebf 676 ${ATTRS_SECTIONS}
886a2506 677 ${OTHER_SECTIONS}
c0913ebf
CZ
678 ${RELOCATING+${OTHER_SYMBOLS}}
679 ${RELOCATING+${DISCARDED}}
886a2506
NC
680}
681EOF
This page took 0.207723 seconds and 4 git commands to generate.