1 # Linker script for ARM COFF.
2 # Based on i386coff.sc by Ian Taylor <ian@cygnus.com>.
3 test -z "$ENTRY" && ENTRY=_start
4 if test -z "${DATA_ADDR}"; then
5 if test "$LD_FLAG" = "N" || test "$LD_FLAG" = "n"; then
10 # These are substituted in as variables in order to get '}' in a shell
11 # conditional expansion.
20 if test "${RELOCATING}"; then
24 /* These zeroes mark the end of the import list. */
25 LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
27 R_IDATA5='SORT(*)(.idata$5)'
37 OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}", "${LITTLE_OUTPUT_FORMAT}")
40 ${RELOCATING+ENTRY (${ENTRY})}
44 /* We start at 0x8000 because gdb assumes it (see FRAME_CHAIN).
45 This is an artifact of the ARM Demon monitor using the bottom 32k
46 as workspace (shared with the FP instruction emulator if
48 .text ${RELOCATING+ 0x8000} : {
54 ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
55 LONG (-1); *(.ctors); *(.ctor); LONG (0); }
56 ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
57 LONG (-1); *(.dtors); *(.dtor); LONG (0); }
59 ${RELOCATING+ etext = .;}
60 ${RELOCATING+ _etext = .;}
62 .data ${RELOCATING+${DATA_ADDR-0x40000 + (ALIGN(0x8) & 0xfffc0fff)}} : {
63 ${RELOCATING+ __data_start__ = . ;}
66 ${RELOCATING+*(.gcc_exc*)}
67 ${RELOCATING+___EH_FRAME_BEGIN__ = . ;}
68 ${RELOCATING+*(.eh_fram*)}
69 ${RELOCATING+___EH_FRAME_END__ = . ;}
70 ${RELOCATING+LONG(0);}
72 ${RELOCATING+ __data_end__ = . ;}
73 ${RELOCATING+ edata = .;}
74 ${RELOCATING+ _edata = .;}
76 ${CONSTRUCTING+${RELOCATING-$CTOR}}
77 ${CONSTRUCTING+${RELOCATING-$DTOR}}
78 .idata ${RELOCATING+BLOCK(__section_alignment__)} :
80 /* This cannot currently be handled with grouped sections.
81 See pep.em:sort_sections. */
83 ${RELOCATING+__IAT_start__ = .;}
85 ${RELOCATING+__IAT_end__ = .;}
88 .bss ${RELOCATING+ ALIGN(0x8)} :
90 ${RELOCATING+ __bss_start__ = . ;}
93 ${RELOCATING+ __bss_end__ = . ;}
96 ${RELOCATING+ end = .;}
97 ${RELOCATING+ _end = .;}
98 ${RELOCATING+ __end__ = .;}
100 .stab 0 ${RELOCATING+(NOLOAD)} :
104 .stabstr 0 ${RELOCATING+(NOLOAD)} :