1 # Linker script for ARM COFF.
2 # Based on i386coff.sc by Ian Taylor <ian@cygnus.com>.
4 # Copyright (C) 2014-2016 Free Software Foundation, Inc.
6 # Copying and distribution of this file, with or without modification,
7 # are permitted in any medium without royalty provided the copyright
8 # notice and this notice are preserved.
10 test -z "$ENTRY" && ENTRY=_start
11 if test -z "${DATA_ADDR}"; then
12 if test "$LD_FLAG" = "N" || test "$LD_FLAG" = "n"; then
17 # These are substituted in as variables in order to get '}' in a shell
18 # conditional expansion.
29 /* Copyright (C) 2014-2016 Free Software Foundation, Inc.
31 Copying and distribution of this script, with or without modification,
32 are permitted in any medium without royalty provided the copyright
33 notice and this notice are preserved. */
35 OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}", "${LITTLE_OUTPUT_FORMAT}")
38 ${RELOCATING+ENTRY (${ENTRY})}
42 /* We start at 0x8000 because gdb assumes it (see FRAME_CHAIN).
43 This is an artifact of the ARM Demon monitor using the bottom 32k
44 as workspace (shared with the FP instruction emulator if
46 .text ${RELOCATING+ 0x8000} : {
52 ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
53 LONG (-1); *(.ctors); *(.ctor); LONG (0); }
54 ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
55 LONG (-1); *(.dtors); *(.dtor); LONG (0); }
57 ${RELOCATING+ etext = .;}
58 ${RELOCATING+ _etext = .;}
60 .data ${RELOCATING+${DATA_ADDR-0x40000 + (ALIGN(0x8) & 0xfffc0fff)}} : {
61 ${RELOCATING+ __data_start__ = . ;}
64 ${RELOCATING+*(.gcc_exc*)}
65 ${RELOCATING+___EH_FRAME_BEGIN__ = . ;}
66 ${RELOCATING+*(.eh_fram*)}
67 ${RELOCATING+___EH_FRAME_END__ = . ;}
68 ${RELOCATING+LONG(0);}
70 ${RELOCATING+ __data_end__ = . ;}
71 ${RELOCATING+ edata = .;}
72 ${RELOCATING+ _edata = .;}
74 ${CONSTRUCTING+${RELOCATING-$CTOR}}
75 ${CONSTRUCTING+${RELOCATING-$DTOR}}
76 .bss ${RELOCATING+ ALIGN(0x8)} :
78 ${RELOCATING+ __bss_start__ = . ;}
81 ${RELOCATING+ __bss_end__ = . ;}
84 ${RELOCATING+ end = .;}
85 ${RELOCATING+ _end = .;}
86 ${RELOCATING+ __end__ = .;}
88 .stab 0 ${RELOCATING+(NOLOAD)} :
92 .stabstr 0 ${RELOCATING+(NOLOAD)} :