1 # Linker script for TI TMS320C80 (tic80) COFF.
3 # Besides the shell variables set by the emulparams script, and the LD_FLAG
4 # variable, the genscripts.sh script will set the following variables for each
5 # time this script is run to generate one of the linker scripts for ldscripts:
7 # RELOCATING: Set to a non-empty string when the linker is going to be doing
10 # CONSTRUCTING: Set to a non-empty string when the linker is going to be
11 # building global constructor and destructor tables.
13 # DATA_ALIGNMENT: Set to an ALIGN expression when the output should be page
14 # aligned, or to "." when generating the -N script.
16 # CREATE_SHLIB: Set to a non-empty string when generating a script for
17 # the -shared linker arg.
19 test -z "$TEXT_START_ADDR" && TEXT_START_ADDR="0x80000 + SIZEOF_HEADERS"
20 test -z "$ENTRY" && ENTRY=__start
23 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
30 .text ${RELOCATING+ $TEXT_START_ADDR} : {
39 ${CONSTRUCTING+ . = ALIGN(4);}
40 ${CONSTRUCTING+ ___CTOR_LIST__ = .;}
41 ${CONSTRUCTING+ LONG(-1)}
43 ${CONSTRUCTING+ ___CTOR_END__ = .;}
44 ${CONSTRUCTING+ LONG(0)}
47 ${CONSTRUCTING+ ___DTOR_LIST__ = .;}
48 ${CONSTRUCTING+ LONG(-1)}
49 ${CONSTRUCTING+ *(.dtors)}
50 ${CONSTRUCTING+ ___DTOR_END__ = .;}
51 ${CONSTRUCTING+ LONG(0)}
53 ${RELOCATING+ etext = .;}
56 ${RELOCATING+ __edata = .};
59 ${RELOCATING+ __bss_start = .};
62 ${RELOCATING+ _end = ALIGN(0x8)};
63 ${RELOCATING+ __end = ALIGN(0x8)};
65 .stab 0 ${RELOCATING+(NOLOAD)} :
69 .stabstr 0 ${RELOCATING+(NOLOAD)} :