Use ${CONSTRUCTING...} to enclose constructors and destructors.
[binutils-gdb.git] / ld / scripttempl / h8500b.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 /* Code and data, both larger than 64k */
14
15 SECTIONS
16 {
17 .text ${RELOCATING+ 0x10000} :
18 {
19 *(.text)
20
21 ${RELOCATING+ _etext = . ; }
22 }
23
24
25 .data ${RELOCATING+ 0x20000} :
26 {
27 *(.data)
28 ${RELOCATING+ _edata = . ; }
29 }
30
31 .rdata ${RELOCATING+ 0x30000} :
32 {
33 *(.rdata);
34 *(.strings)
35
36 ${CONSTRUCTING+${TORS}}
37 }
38
39 .bss ${RELOCATING+ 0x40000} :
40 {
41 ${RELOCATING+ __start_bss = . ; }
42 *(.bss)
43 *(COMMON)
44 ${RELOCATING+ _end = . ; }
45 }
46
47 .stack ${RELOCATING+ 0x50000} :
48 {
49 ${RELOCATING+ _stack = . ; }
50 *(.stack)
51 }
52
53 .stab 0 ${RELOCATING+(NOLOAD)} :
54 {
55 [ .stab ]
56 }
57 .stabstr 0 ${RELOCATING+(NOLOAD)} :
58 {
59 [ .stabstr ]
60 }
61 }
62 EOF
63
64
65
66