1999-01-31 17:57:31 1998 Michael Meissner <meissner@cygnus.com>
[deliverable/binutils-gdb.git] / ld / scripttempl / armcoff.sc
CommitLineData
132dd910
DE
1# Linker script for ARM COFF.
2# Based on i386coff.sc by Ian Taylor <ian@cygnus.com>.
3test -z "$ENTRY" && ENTRY=_start
df6b92ed
ILT
4if test -z "${DATA_ADDR}"; then
5 if test "$LD_FLAG" = "N" || test "$LD_FLAG" = "n"; then
6 DATA_ADDR=.
7 fi
8fi
132dd910
DE
9cat <<EOF
10OUTPUT_FORMAT("${OUTPUT_FORMAT}")
11${LIB_SEARCH_DIRS}
12
13ENTRY(${ENTRY})
14
15SECTIONS
16{
df6b92ed
ILT
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} : {
132dd910
DE
22 *(.init)
23 *(.text)
df6b92ed
ILT
24 ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
25 LONG (-1); *(.ctors); *(.ctor); LONG (0); }
26 ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
27 LONG (-1); *(.dtors); *(.dtor); LONG (0); }
132dd910
DE
28 *(.fini)
29 ${RELOCATING+ etext = .};
30 }
df6b92ed
ILT
31 .data ${RELOCATING+${DATA_ADDR-0x40000 + (. & 0xffc00fff)}} : {
32 __data_start__ = . ;
132dd910 33 *(.data)
df6b92ed 34 __data_end__ = . ;
132dd910
DE
35 ${RELOCATING+ edata = .};
36 }
37 .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
38 {
df6b92ed 39 __bss_start__ = . ;
132dd910
DE
40 *(.bss)
41 *(COMMON)
df6b92ed 42 __bss_end__ = . ;
132dd910 43 }
df6b92ed
ILT
44
45 ${RELOCATING+ __end__ = .};
46
132dd910
DE
47 .stab 0 ${RELOCATING+(NOLOAD)} :
48 {
49 [ .stab ]
50 }
51 .stabstr 0 ${RELOCATING+(NOLOAD)} :
52 {
53 [ .stabstr ]
54 }
55}
56EOF
This page took 0.120042 seconds and 4 git commands to generate.