]>
Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | cat <<EOF |
2 | OUTPUT_FORMAT("${OUTPUT_FORMAT}") | |
3 | OUTPUT_ARCH(h8300s) | |
4 | ENTRY("_start") | |
5 | ||
6 | /* The memory size is 256KB to coincide with the simulator. | |
7 | Don't change either without considering the other. */ | |
8 | ||
9 | MEMORY | |
10 | { | |
11 | /* 0xc4 is a magic entry. We should have the linker just | |
12 | skip over it one day... */ | |
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 | |
19 | /* This holds variables in the "tiny" sections. */ | |
20 | tiny : o = 0xff8000, l = 0x7f00 | |
21 | /* At the very top of the address space is the 8-bit area. */ | |
22 | eight : o = 0xffff00, l = 0x100 | |
23 | } | |
24 | ||
25 | SECTIONS | |
26 | { | |
27 | .vectors : { | |
28 | /* Use something like this to place a specific function's address | |
29 | into the vector table. | |
30 | ||
31 | LONG(ABSOLUTE(_foobar)) */ | |
32 | ||
33 | *(.vectors) | |
34 | } ${RELOCATING+ > vectors} | |
35 | .text : { | |
36 | *(.rodata) | |
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} | |
63 | .tiny : { | |
64 | *(.tiny) | |
65 | } ${RELOCATING+ > tiny} | |
66 | .eight : { | |
67 | *(.eight) | |
68 | } ${RELOCATING+ > eight} | |
69 | .stab 0 ${RELOCATING+(NOLOAD)} : { | |
70 | [ .stab ] | |
71 | } | |
72 | .stabstr 0 ${RELOCATING+(NOLOAD)} : { | |
73 | [ .stabstr ] | |
74 | } | |
75 | } | |
76 | EOF |