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} : {
34 ${CONSTRUCTING+ . = ALIGN(4);}
35 ${CONSTRUCTING+ ___CTOR_LIST__ = .;}
36 ${CONSTRUCTING+ LONG((___CTOR_END__ - ___CTOR_LIST__) / 4 - 2)}
37 ${CONSTRUCTING+ *(.ctors)}
38 ${CONSTRUCTING+ LONG(0)}
39 ${CONSTRUCTING+ ___CTOR_END__ = .;}
40 ${CONSTRUCTING+ ___DTOR_LIST__ = .;}
41 ${CONSTRUCTING+ LONG((___DTOR_END__ - ___DTOR_LIST__) / 4 - 2)}
42 ${CONSTRUCTING+ *(.dtors)}
43 ${CONSTRUCTING+ LONG(0)}
44 ${CONSTRUCTING+ ___DTOR_END__ = .;}
45 ${RELOCATING+ etext = .;}
49 ${RELOCATING+ __edata = .};
52 ${RELOCATING+ __bss_start = .};
55 ${RELOCATING+ _end = ALIGN(0x8)};
56 ${RELOCATING+ __end = ALIGN(0x8)};
58 .stab 0 ${RELOCATING+(NOLOAD)} :
62 .stabstr 0 ${RELOCATING+(NOLOAD)} :