Use ${CONSTRUCTING...} to enclose constructors and destructors.
[binutils-gdb.git] / ld / scripttempl / h8500c.sc
1 TORS="
2 ___ctors = . ;
3 *(.ctors)
4 ___ctors_end = . ;
5 ___dtors = . ;
6 *(.dtors)
7 ___dtors_end = . ;"
8
9 cat <<EOF
10 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
11 OUTPUT_ARCH(${ARCH})
12
13 /* Compact model - code < 64k, data > 64k */
14
15 SECTIONS
16 {
17 .text 0x10000 :
18 {
19 *(.text)
20 *(.strings)
21 ${RELOCATING+ _etext = . ; }
22 } ${RELOCATING+ > ram}
23
24
25 .data 0x20000 :
26 {
27 *(.data)
28 ${RELOCATING+ _edata = . ; }
29 } ${RELOCATING+ > ram}
30
31 .rdata 0x30000 :
32 {
33 *(.rdata);
34
35 ${CONSTRUCTING+${TORS}}
36 } ${RELOCATING+ > ram}
37
38 .bss 0x40000 :
39 {
40 ${RELOCATING+ __start_bss = . ; }
41 *(.bss)
42 *(COMMON)
43 ${RELOCATING+ _end = . ; }
44 } ${RELOCATING+ >ram}
45 .stack 0x5fff0 :
46 {
47 ${RELOCATING+ _stack = . ; }
48 *(.stack)
49 } ${RELOCATING+ > topram}
50
51 .stab 0 ${RELOCATING+(NOLOAD)} :
52 {
53 [ .stab ]
54 }
55 .stabstr 0 ${RELOCATING+(NOLOAD)} :
56 {
57 [ .stabstr ]
58 }
59 }
60 EOF
61
62
63
64