This commit was generated by cvs2svn to track changes on a CVS vendor
[deliverable/binutils-gdb.git] / ld / scripttempl / tic80coff.sc
1 # Linker script for TI TMS320C80 (tic80) COFF.
2 #
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:
6 #
7 # RELOCATING: Set to a non-empty string when the linker is going to be doing
8 # a final relocation.
9 #
10 # CONSTRUCTING: Set to a non-empty string when the linker is going to be
11 # building global constructor and destructor tables.
12 #
13 # DATA_ALIGNMENT: Set to an ALIGN expression when the output should be page
14 # aligned, or to "." when generating the -N script.
15 #
16 # CREATE_SHLIB: Set to a non-empty string when generating a script for
17 # the -shared linker arg.
18
19 test -z "$TEXT_START_ADDR" && TEXT_START_ADDR="0x80000 + SIZEOF_HEADERS"
20 test -z "$ENTRY" && ENTRY=__start
21
22 cat <<EOF
23 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
24 ${LIB_SEARCH_DIRS}
25
26 ENTRY(${ENTRY})
27
28 SECTIONS
29 {
30 .text ${RELOCATING+ $TEXT_START_ADDR} : {
31 *(.init)
32 *(.fini)
33 *(.text)
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 = .;}
46 }
47 .data : {
48 *(.data)
49 ${RELOCATING+ __edata = .};
50 }
51 .bss : {
52 ${RELOCATING+ __bss_start = .};
53 *(.bss)
54 *(COMMON)
55 ${RELOCATING+ _end = ALIGN(0x8)};
56 ${RELOCATING+ __end = ALIGN(0x8)};
57 }
58 .stab 0 ${RELOCATING+(NOLOAD)} :
59 {
60 [ .stab ]
61 }
62 .stabstr 0 ${RELOCATING+(NOLOAD)} :
63 {
64 [ .stabstr ]
65 }
66 }
67 EOF
This page took 0.032622 seconds and 5 git commands to generate.