]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - ld/scripttempl/h8300h.sc
* config/sh/tm-sh.h (BELIEVE_PCC_PROMOTION): Define, so that
[thirdparty/binutils-gdb.git] / ld / scripttempl / h8300h.sc
CommitLineData
0e88ffa2
JL
1cat <<EOF
2OUTPUT_FORMAT("${OUTPUT_FORMAT}")
3OUTPUT_ARCH(h8300h)
12688490 4ENTRY("_start")
0e88ffa2
JL
5
6/* The memory size is 256KB to coincide with the simulator.
7 Don't change either without considering the other. */
8
9MEMORY
10{
11 /* 0xc4 is a magic entry. We should have the linker just
12 skip over it one day... */
4015337e
JL
13 vectors : o = 0x0000, l = 0xc4
14 magicvectors : o = 0xc4, l = 0x3c
15 /* We still only use 256k as the main ram size. */
16 ram : o = 0x0100, l = 0x3fefc
17 /* The stack starts at the top of main ram. */
18 topram : o = 0x3fffc, l = 0x4
00e6a1b1
JL
19 /* This holds variables in the "tiny" sections. */
20 tiny : o = 0xff8000, l = 7f00
4015337e 21 /* At the very top of the address space is the 8-bit area. */
00e6a1b1 22 eight : o = 0xffff00, l = 0x100
0e88ffa2
JL
23}
24
25SECTIONS
26{
27.vectors : {
4015337e
JL
28 /* Use something like this to place a specific function's address
29 into the vector table.
0e88ffa2 30
4015337e 31 LONG(ABSOLUTE(_foobar)) */
0e88ffa2 32
0e88ffa2
JL
33 *(.vectors)
34 } ${RELOCATING+ > vectors}
35.text : {
d38d6b7a 36 *(.rodata)
0e88ffa2
JL
37 *(.text)
38 *(.strings)
39 ${RELOCATING+ _etext = . ; }
40 } ${RELOCATING+ > ram}
41.tors : {
42 ___ctors = . ;
43 *(.ctors)
44 ___ctors_end = . ;
45 ___dtors = . ;
46 *(.dtors)
47 ___dtors_end = . ;
48 } ${RELOCATING+ > ram}
49.data : {
50 *(.data)
51 ${RELOCATING+ _edata = . ; }
52 } ${RELOCATING+ > ram}
53.bss : {
54 ${RELOCATING+ _bss_start = . ;}
55 *(.bss)
56 *(COMMON)
57 ${RELOCATING+ _end = . ; }
58 } ${RELOCATING+ >ram}
59.stack : {
60 ${RELOCATING+ _stack = . ; }
61 *(.stack)
62 } ${RELOCATING+ > topram}
00e6a1b1
JL
63.data : {
64 *(.tiny)
65 } ${RELOCATING+ > tiny}
4015337e
JL
66.eight : {
67 *(.eight)
68 } ${RELOCATING+ > eight}
0e88ffa2
JL
69.stab 0 ${RELOCATING+(NOLOAD)} : {
70 [ .stab ]
71 }
72.stabstr 0 ${RELOCATING+(NOLOAD)} : {
73 [ .stabstr ]
74 }
75}
76EOF