[501d312] | 1 | /* |
---|
| 2 | * $Id$ |
---|
| 3 | */ |
---|
| 4 | |
---|
[3631dad8] | 5 | OUTPUT_ARCH(h8300h) |
---|
[501d312] | 6 | /* |
---|
| 7 | * Declare some sizes. |
---|
| 8 | */ |
---|
| 9 | _RamBase = DEFINED(_RamBase) ? _RamBase : 0x0; |
---|
| 10 | _RamSize = DEFINED(_RamSize) ? _RamSize : 1M; |
---|
[3631dad8] | 11 | _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x4000; |
---|
[501d312] | 12 | _StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000; |
---|
| 13 | |
---|
| 14 | ENTRY("_start") |
---|
| 15 | /* The memory size is 256KB to coincide with the simulator. |
---|
| 16 | Don't change either without considering the other. */ |
---|
| 17 | MEMORY |
---|
| 18 | { |
---|
| 19 | /* 0xc4 is a magic entry. We should have the linker just |
---|
| 20 | skip over it one day... */ |
---|
| 21 | vectors : o = 0x0000, l = 0xc4 |
---|
| 22 | magicvectors : o = 0xc4, l = 0x3c |
---|
| 23 | /* We still only use 256k as the main ram size. */ |
---|
| 24 | ram : o = 0x0100, l = 0x3fefc |
---|
| 25 | /* The stack starts at the top of main ram. */ |
---|
| 26 | topram : o = 0x3fffc, l = 0x4 |
---|
| 27 | /* This holds variables in the "tiny" sections. */ |
---|
| 28 | tiny : o = 0xff8000, l = 0x7f00 |
---|
| 29 | /* At the very top of the address space is the 8-bit area. */ |
---|
| 30 | eight : o = 0xffff00, l = 0x100 |
---|
| 31 | } |
---|
| 32 | |
---|
| 33 | |
---|
| 34 | SECTIONS |
---|
| 35 | { |
---|
| 36 | .vectors : |
---|
| 37 | { |
---|
| 38 | *(.vectors) |
---|
| 39 | } > vectors |
---|
| 40 | |
---|
| 41 | .text : |
---|
| 42 | { |
---|
| 43 | *(.text) |
---|
| 44 | |
---|
[7b0c547a] | 45 | /* |
---|
| 46 | * Special FreeBSD sysctl sections. |
---|
| 47 | */ |
---|
| 48 | . = ALIGN (16); |
---|
| 49 | __start_set_sysctl_set = .; |
---|
| 50 | *(set_sysctl_*); |
---|
| 51 | __stop_set_sysctl_set = ABSOLUTE(.); |
---|
| 52 | *(set_domain_*); |
---|
| 53 | *(set_pseudo_*); |
---|
| 54 | |
---|
[3631dad8] | 55 | /* |
---|
| 56 | * Read-only data |
---|
| 57 | */ |
---|
| 58 | . = ALIGN (16); |
---|
| 59 | PROVIDE(_rodata_start = . ); |
---|
| 60 | *(.rodata) |
---|
| 61 | *(.gnu.linkonce.r*) |
---|
| 62 | PROVIDE(_erodata = . ); |
---|
| 63 | |
---|
| 64 | _etext = .; |
---|
| 65 | } >ram |
---|
[db3ca1f] | 66 | .tors SIZEOF(.text) + ADDR(.text): { |
---|
[3631dad8] | 67 | ___ctors = . ; |
---|
| 68 | *(.ctors) |
---|
| 69 | ___ctors_end = . ; |
---|
| 70 | ___dtors = . ; |
---|
| 71 | *(.dtors) |
---|
| 72 | ___dtors_end = . ; |
---|
[501d312] | 73 | } >ram |
---|
[db3ca1f] | 74 | .data SIZEOF(.tors) + ADDR(.tors): |
---|
[501d312] | 75 | { |
---|
| 76 | *(.data) |
---|
[db3ca1f] | 77 | *(.gcc_exc*) |
---|
[501d312] | 78 | CONSTRUCTORS |
---|
| 79 | _edata = .; |
---|
| 80 | } >ram |
---|
| 81 | .bss SIZEOF(.data) + ADDR(.data): |
---|
| 82 | { |
---|
| 83 | _bss_start = .; |
---|
| 84 | *(.bss) |
---|
| 85 | *(COMMON) |
---|
| 86 | . = ALIGN (64); |
---|
| 87 | . += _StackSize; |
---|
| 88 | _stack_init = .; |
---|
| 89 | _clear_end = .; |
---|
| 90 | _WorkspaceBase = .; |
---|
| 91 | _end = .; |
---|
| 92 | __end = .; |
---|
| 93 | } >ram |
---|
| 94 | .tiny : { |
---|
| 95 | *(.tiny) |
---|
| 96 | } > tiny |
---|
| 97 | .eight : { |
---|
| 98 | *(.eight) |
---|
| 99 | } > eight |
---|
| 100 | .stab 0 (NOLOAD) : { |
---|
| 101 | [ .stab ] |
---|
| 102 | } |
---|
| 103 | .stabstr 0 (NOLOAD) : { |
---|
| 104 | [ .stabstr ] |
---|
| 105 | } |
---|
| 106 | |
---|
| 107 | } |
---|