2001-06-29 Andreas Jaeger <aj@suse.de>
[deliverable/binutils-gdb.git] / ld / scripttempl / h8300.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(${ARCH})
14ENTRY("_start")
15
16MEMORY
17{
18 /* 0xc4 is a magic entry. We should have the linker just
60c6797e 19 skip over it one day... */
252b5132
RH
20 vectors : o = 0x0000, l = 0xc4
21 magicvectors : o = 0xc4, l = 0x3c
22 ram : o = 0x0100, l = 0xfdfc
23 /* The stack starts at the top of main ram. */
24 topram : o = 0xfefc, l = 0x4
60c6797e 25 /* At the very top of the address space is the 8-bit area. */
252b5132
RH
26 eight : o = 0xff00, l = 0x100
27}
28
60c6797e
KH
29SECTIONS
30{
40a633d5 31.vectors :
1ce7de8b 32 {
40a633d5 33 /* Use something like this to place a specific
60c6797e 34 function's address into the vector table.
252b5132 35
40a633d5 36 SHORT (ABSOLUTE (_foobar)). */
252b5132 37
40a633d5 38 *(.vectors)
1ce7de8b 39 } ${RELOCATING+ > vectors}
252b5132 40
40a633d5 41.text :
60c6797e
KH
42 {
43 *(.rodata)
44 *(.text)
40a633d5
NC
45 *(.strings)
46 ${RELOCATING+ _etext = . ; }
252b5132 47 } ${RELOCATING+ > ram}
60c6797e 48
1ce7de8b 49${CONSTRUCTING+${TORS}}
60c6797e 50
40a633d5
NC
51.data :
52 {
53 *(.data)
54 *(.tiny)
55 ${RELOCATING+ _edata = . ; }
252b5132 56 } ${RELOCATING+ > ram}
60c6797e 57
40a633d5
NC
58.bss :
59 {
60 ${RELOCATING+ _bss_start = . ;}
61 *(.bss)
62 *(COMMON)
63 ${RELOCATING+ _end = . ; }
252b5132 64 } ${RELOCATING+ >ram}
60c6797e 65
40a633d5
NC
66.stack :
67 {
68 ${RELOCATING+ _stack = . ; }
69 *(.stack)
252b5132 70 } ${RELOCATING+ > topram}
60c6797e 71
40a633d5
NC
72.eight :
73 {
74 *(.eight)
252b5132 75 } ${RELOCATING+ > eight}
60c6797e 76
40a633d5
NC
77.stab 0 ${RELOCATING+(NOLOAD)} :
78 {
79 [ .stab ]
252b5132 80 }
60c6797e 81
40a633d5
NC
82.stabstr 0 ${RELOCATING+(NOLOAD)} :
83 {
84 [ .stabstr ]
252b5132
RH
85 }
86}
87EOF
This page took 0.076931 seconds and 4 git commands to generate.