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