* arch.c: Regenerate.
[deliverable/binutils-gdb.git] / ld / scripttempl / armcoff.sc
CommitLineData
252b5132
RH
1# Linker script for ARM COFF.
2# Based on i386coff.sc by Ian Taylor <ian@cygnus.com>.
3test -z "$ENTRY" && ENTRY=_start
4if test -z "${DATA_ADDR}"; then
5 if test "$LD_FLAG" = "N" || test "$LD_FLAG" = "n"; then
6 DATA_ADDR=.
7 fi
8fi
fd521b47
NC
9
10# These are substituted in as variables in order to get '}' in a shell
11# conditional expansion.
12CTOR='.ctor : {
13 *(SORT(.ctors.*))
14 *(.ctor)
15 }'
16DTOR='.dtor : {
17 *(SORT(.dtors.*))
18 *(.dtor)
19 }'
20
252b5132 21cat <<EOF
6da0974a 22OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}", "${LITTLE_OUTPUT_FORMAT}")
252b5132
RH
23${LIB_SEARCH_DIRS}
24
596d6d91 25${RELOCATING+ENTRY (${ENTRY})}
252b5132
RH
26
27SECTIONS
28{
29 /* We start at 0x8000 because gdb assumes it (see FRAME_CHAIN).
30 This is an artifact of the ARM Demon monitor using the bottom 32k
31 as workspace (shared with the FP instruction emulator if
32 present): */
33 .text ${RELOCATING+ 0x8000} : {
34 *(.init)
87748b32 35 *(.text*)
252b5132
RH
36 *(.glue_7t)
37 *(.glue_7)
38 *(.rdata)
39 ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
40 LONG (-1); *(.ctors); *(.ctor); LONG (0); }
41 ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
42 LONG (-1); *(.dtors); *(.dtor); LONG (0); }
43 *(.fini)
44 ${RELOCATING+ etext = .;}
87748b32 45 ${RELOCATING+ _etext = .;}
252b5132 46 }
e16bb312 47 .data ${RELOCATING+${DATA_ADDR-0x40000 + (ALIGN(0x8) & 0xfffc0fff)}} : {
252b5132 48 ${RELOCATING+ __data_start__ = . ;}
87748b32 49 *(.data*)
fd521b47
NC
50
51 ${RELOCATING+*(.gcc_exc*)}
52 ${RELOCATING+___EH_FRAME_BEGIN__ = . ;}
53 ${RELOCATING+*(.eh_fram*)}
54 ${RELOCATING+___EH_FRAME_END__ = . ;}
55 ${RELOCATING+LONG(0);}
56
252b5132
RH
57 ${RELOCATING+ __data_end__ = . ;}
58 ${RELOCATING+ edata = .;}
59 ${RELOCATING+ _edata = .;}
60 }
fd521b47
NC
61 ${CONSTRUCTING+${RELOCATING-$CTOR}}
62 ${CONSTRUCTING+${RELOCATING-$DTOR}}
e16bb312 63 .bss ${RELOCATING+ ALIGN(0x8)} :
252b5132
RH
64 {
65 ${RELOCATING+ __bss_start__ = . ;}
66 *(.bss)
67 *(COMMON)
68 ${RELOCATING+ __bss_end__ = . ;}
69 }
70
71 ${RELOCATING+ end = .;}
72 ${RELOCATING+ _end = .;}
73 ${RELOCATING+ __end__ = .;}
74
75 .stab 0 ${RELOCATING+(NOLOAD)} :
76 {
77 [ .stab ]
78 }
79 .stabstr 0 ${RELOCATING+(NOLOAD)} :
80 {
81 [ .stabstr ]
82 }
83}
84EOF
This page took 0.555351 seconds and 4 git commands to generate.