2009-11-09 Tristan Gingold <gingold@adacore.com>
[deliverable/binutils-gdb.git] / ld / scripttempl / h8300s.sc
CommitLineData
40a633d5 1TORS=".tors :
1ce7de8b
KH
2 {
3 ___ctors = . ;
4 *(.ctors)
5 ___ctors_end = . ;
6 ___dtors = . ;
7 *(.dtors)
8 ___dtors_end = . ;
9 } > ram"
40a633d5 10
252b5132
RH
11cat <<EOF
12OUTPUT_FORMAT("${OUTPUT_FORMAT}")
13OUTPUT_ARCH(h8300s)
596d6d91 14${RELOCATING+ENTRY ("_start")}
252b5132
RH
15
16/* The memory size is 256KB to coincide with the simulator.
17 Don't change either without considering the other. */
18
19MEMORY
20{
60c6797e
KH
21 /* 0xc4 is a magic entry. We should have the linker just
22 skip over it one day... */
23 vectors : o = 0x0000, l = 0xc4
24 magicvectors : o = 0xc4, l = 0x3c
252b5132
RH
25 /* We still only use 256k as the main ram size. */
26 ram : o = 0x0100, l = 0x3fefc
27 /* The stack starts at the top of main ram. */
28 topram : o = 0x3fffc, l = 0x4
29 /* This holds variables in the "tiny" sections. */
30 tiny : o = 0xff8000, l = 0x7f00
31 /* At the very top of the address space is the 8-bit area. */
32 eight : o = 0xffff00, l = 0x100
33}
34
60c6797e
KH
35SECTIONS
36{
40a633d5 37.vectors :
1ce7de8b 38 {
60c6797e
KH
39 /* Use something like this to place a specific
40 function's address into the vector table.
252b5132 41
40a633d5 42 LONG (ABSOLUTE (_foobar)). */
252b5132 43
40a633d5 44 *(.vectors)
252b5132 45 } ${RELOCATING+ > vectors}
60c6797e 46
40a633d5 47.text :
60c6797e
KH
48 {
49 *(.rodata)
50 *(.text)
40a633d5
NC
51 *(.strings)
52 ${RELOCATING+ _etext = . ; }
252b5132 53 } ${RELOCATING+ > ram}
60c6797e 54
1ce7de8b 55${CONSTRUCTING+${TORS}}
60c6797e 56
40a633d5
NC
57.data :
58 {
59 *(.data)
60 ${RELOCATING+ _edata = . ; }
252b5132 61 } ${RELOCATING+ > ram}
60c6797e 62
40a633d5
NC
63.bss :
64 {
65 ${RELOCATING+ _bss_start = . ;}
66 *(.bss)
67 *(COMMON)
68 ${RELOCATING+ _end = . ; }
252b5132 69 } ${RELOCATING+ >ram}
60c6797e 70
40a633d5
NC
71.stack :
72 {
73 ${RELOCATING+ _stack = . ; }
74 *(.stack)
252b5132 75 } ${RELOCATING+ > topram}
60c6797e 76
40a633d5
NC
77.tiny :
78 {
79 *(.tiny)
252b5132 80 } ${RELOCATING+ > tiny}
60c6797e 81
40a633d5
NC
82.eight :
83 {
84 *(.eight)
252b5132 85 } ${RELOCATING+ > eight}
60c6797e 86
40a633d5
NC
87.stab 0 ${RELOCATING+(NOLOAD)} :
88 {
89 [ .stab ]
252b5132 90 }
60c6797e 91
40a633d5
NC
92.stabstr 0 ${RELOCATING+(NOLOAD)} :
93 {
94 [ .stabstr ]
252b5132
RH
95 }
96}
97EOF
This page took 0.396515 seconds and 4 git commands to generate.