]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - ld/scripttempl/armcoff.sc
Zap romp host.
[thirdparty/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
9cat <<EOF
6da0974a 10OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}", "${LITTLE_OUTPUT_FORMAT}")
252b5132
RH
11${LIB_SEARCH_DIRS}
12
13ENTRY(${ENTRY})
14
15SECTIONS
16{
17 /* We start at 0x8000 because gdb assumes it (see FRAME_CHAIN).
18 This is an artifact of the ARM Demon monitor using the bottom 32k
19 as workspace (shared with the FP instruction emulator if
20 present): */
21 .text ${RELOCATING+ 0x8000} : {
22 *(.init)
23 *(.text)
24 *(.glue_7t)
25 *(.glue_7)
26 *(.rdata)
27 ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
28 LONG (-1); *(.ctors); *(.ctor); LONG (0); }
29 ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
30 LONG (-1); *(.dtors); *(.dtor); LONG (0); }
31 *(.fini)
32 ${RELOCATING+ etext = .;}
33 }
34 .data ${RELOCATING+${DATA_ADDR-0x40000 + (. & 0xfffc0fff)}} : {
35 ${RELOCATING+ __data_start__ = . ;}
36 *(.data)
37 ${RELOCATING+ __data_end__ = . ;}
38 ${RELOCATING+ edata = .;}
39 ${RELOCATING+ _edata = .;}
40 }
41 .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
42 {
43 ${RELOCATING+ __bss_start__ = . ;}
44 *(.bss)
45 *(COMMON)
46 ${RELOCATING+ __bss_end__ = . ;}
47 }
48
49 ${RELOCATING+ end = .;}
50 ${RELOCATING+ _end = .;}
51 ${RELOCATING+ __end__ = .;}
52
53 .stab 0 ${RELOCATING+(NOLOAD)} :
54 {
55 [ .stab ]
56 }
57 .stabstr 0 ${RELOCATING+(NOLOAD)} :
58 {
59 [ .stabstr ]
60 }
61}
62EOF