1 # Linker script for TI TMS320C80 (tic80) COFF.
3 # Copyright (C) 2014-2017 Free Software Foundation, Inc.
5 # Copying and distribution of this file, with or without modification,
6 # are permitted in any medium without royalty provided the copyright
7 # notice and this notice are preserved.
9 # Besides the shell variables set by the emulparams script, and the LD_FLAG
10 # variable, the genscripts.sh script will set the following variables for each
11 # time this script is run to generate one of the linker scripts for ldscripts:
13 # RELOCATING: Set to a non-empty string when the linker is going to be doing
16 # CONSTRUCTING: Set to a non-empty string when the linker is going to be
17 # building global constructor and destructor tables.
19 # DATA_ALIGNMENT: Set to an ALIGN expression when the output should be page
20 # aligned, or to "." when generating the -N script.
22 # CREATE_SHLIB: Set to a non-empty string when generating a script for
23 # the -shared linker arg.
25 test -z "$TEXT_START_ADDR" && TEXT_START_ADDR="0x80000 + SIZEOF_HEADERS"
26 test -z "$ENTRY" && ENTRY=__start
29 /* Copyright (C) 2014-2017 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}")
38 ${RELOCATING+ENTRY (${ENTRY})}
42 .text ${RELOCATING+ $TEXT_START_ADDR} : {
51 ${CONSTRUCTING+ . = ALIGN(4);}
52 ${CONSTRUCTING+ ___CTOR_LIST__ = .;}
53 ${CONSTRUCTING+ LONG(-1)}
55 ${CONSTRUCTING+ ___CTOR_END__ = .;}
56 ${CONSTRUCTING+ LONG(0)}
59 ${CONSTRUCTING+ ___DTOR_LIST__ = .;}
60 ${CONSTRUCTING+ LONG(-1)}
61 ${CONSTRUCTING+ *(.dtors)}
62 ${CONSTRUCTING+ ___DTOR_END__ = .;}
63 ${CONSTRUCTING+ LONG(0)}
65 ${RELOCATING+ etext = .;}
68 ${RELOCATING+ __edata = .};
71 ${RELOCATING+ __bss_start = .};
74 ${RELOCATING+ _end = ALIGN(0x8)};
75 ${RELOCATING+ __end = ALIGN(0x8)};
77 .stab 0 ${RELOCATING+(NOLOAD)} :
81 .stabstr 0 ${RELOCATING+(NOLOAD)} :