[4ba5ac6] | 1 | /* |
---|
[1c554014] | 2 | * linkcmds |
---|
[4ba5ac6] | 3 | */ |
---|
| 4 | |
---|
| 5 | /* |
---|
| 6 | * Declare some sizes. |
---|
| 7 | */ |
---|
[2bd5103] | 8 | RamBase = DEFINED(RamBase) ? RamBase : 0x80000000; |
---|
| 9 | RamSize = DEFINED(RamSize) ? RamSize : 4M; |
---|
| 10 | HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0; |
---|
[4ba5ac6] | 11 | _StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000; |
---|
| 12 | |
---|
| 13 | SECTIONS |
---|
| 14 | { |
---|
| 15 | /* 0x80000000 - 0x800FFFFF used by YAMON |
---|
| 16 | 0x80120000 - 0x8012FFFF reserved for shared memory |
---|
| 17 | 0x80130000 beginning of text (code) section |
---|
| 18 | */ |
---|
| 19 | .text 0x80130000 : |
---|
| 20 | { |
---|
| 21 | _ftext = . ; |
---|
| 22 | eprol = .; |
---|
| 23 | *(.text) |
---|
| 24 | *(.text.*) |
---|
| 25 | *(.gnu.linkonce.t*) |
---|
| 26 | *(.mips16.fn.*) |
---|
| 27 | *(.mips16.call.*) |
---|
| 28 | PROVIDE (__runtime_reloc_start = .); |
---|
| 29 | *(.rel.sdata) |
---|
| 30 | PROVIDE (__runtime_reloc_stop = .); |
---|
| 31 | |
---|
| 32 | /* |
---|
| 33 | * Special FreeBSD sysctl sections. |
---|
| 34 | */ |
---|
| 35 | . = ALIGN (16); |
---|
| 36 | __start_set_sysctl_set = .; |
---|
| 37 | *(set_sysctl_*); |
---|
| 38 | __stop_set_sysctl_set = ABSOLUTE(.); |
---|
| 39 | *(set_domain_*); |
---|
| 40 | *(set_pseudo_*); |
---|
| 41 | |
---|
[d1f57b5] | 42 | *(.gcc_except_table*) |
---|
[4ba5ac6] | 43 | *(.eh_frame_hdr) |
---|
| 44 | *(.eh_frame) |
---|
| 45 | } |
---|
| 46 | |
---|
| 47 | .init : |
---|
| 48 | { |
---|
| 49 | KEEP(*crti.o(.init)) |
---|
| 50 | KEEP(*(.init)) |
---|
| 51 | KEEP(*crtn.o(.init)) |
---|
| 52 | } |
---|
| 53 | |
---|
| 54 | .fini : |
---|
| 55 | { |
---|
| 56 | KEEP(*crti.o(.fini)) |
---|
| 57 | KEEP(*(.fini)) |
---|
| 58 | KEEP(*crtn.o(.fini)) |
---|
| 59 | } |
---|
| 60 | |
---|
| 61 | .ctors : |
---|
| 62 | { |
---|
| 63 | /* gcc uses crtbegin.o to find the start of |
---|
| 64 | the constructors, so we make sure it is |
---|
| 65 | first. Because this is a wildcard, it |
---|
| 66 | doesn't matter if the user does not |
---|
| 67 | actually link against crtbegin.o; the |
---|
| 68 | linker won't look for a file to match a |
---|
| 69 | wildcard. The wildcard also means that it |
---|
| 70 | doesn't matter which directory crtbegin.o |
---|
| 71 | is in. */ |
---|
| 72 | |
---|
| 73 | KEEP (*crtbegin.o(.ctors)) |
---|
| 74 | |
---|
| 75 | /* We don't want to include the .ctor section from |
---|
| 76 | from the crtend.o file until after the sorted ctors. |
---|
| 77 | The .ctor section from the crtend file contains the |
---|
| 78 | end of ctors marker and it must be last */ |
---|
| 79 | |
---|
| 80 | KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) |
---|
| 81 | KEEP (*(SORT(.ctors.*))) |
---|
| 82 | KEEP (*(.ctors)) |
---|
| 83 | } |
---|
| 84 | |
---|
| 85 | .dtors : |
---|
| 86 | { |
---|
| 87 | KEEP (*crtbegin.o(.dtors)) |
---|
| 88 | KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) |
---|
| 89 | KEEP (*(SORT(.dtors.*))) |
---|
| 90 | KEEP (*(.dtors)) |
---|
| 91 | |
---|
| 92 | etext = .; |
---|
| 93 | _etext = .; |
---|
| 94 | } |
---|
| 95 | |
---|
| 96 | .rdata : { |
---|
| 97 | *(.rdata) |
---|
| 98 | *(.rodata) |
---|
| 99 | *(.rodata.*) |
---|
[b618d8c] | 100 | KEEP (*(SORT(.rtemsroset.*))) |
---|
[4ba5ac6] | 101 | *(.gnu.linkonce.r*) |
---|
| 102 | } |
---|
[960fd85] | 103 | |
---|
| 104 | .tdata : { |
---|
| 105 | _TLS_Data_begin = .; |
---|
| 106 | *(.tdata .tdata.* .gnu.linkonce.td.*) |
---|
| 107 | _TLS_Data_end = .; |
---|
| 108 | } |
---|
| 109 | |
---|
| 110 | .tbss : { |
---|
| 111 | _TLS_BSS_begin = .; |
---|
| 112 | *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) |
---|
| 113 | _TLS_BSS_end = .; |
---|
| 114 | } |
---|
| 115 | |
---|
| 116 | _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin; |
---|
[d60e760] | 117 | _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin; |
---|
| 118 | _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin; |
---|
[960fd85] | 119 | _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin; |
---|
| 120 | _TLS_Size = _TLS_BSS_end - _TLS_Data_begin; |
---|
[d60e760] | 121 | _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss)); |
---|
[960fd85] | 122 | |
---|
[4ba5ac6] | 123 | _fdata = ALIGN(16); |
---|
| 124 | |
---|
| 125 | .data : { |
---|
| 126 | *(.data) |
---|
| 127 | *(.data.*) |
---|
[b618d8c] | 128 | KEEP (*(SORT(.rtemsrwset.*))) |
---|
[4ba5ac6] | 129 | *(.gnu.linkonce.d*) |
---|
| 130 | SORT(CONSTRUCTORS) |
---|
| 131 | } |
---|
| 132 | . = ALIGN(8); |
---|
| 133 | |
---|
| 134 | .jcr : { |
---|
| 135 | KEEP (*(.jcr)) |
---|
| 136 | } |
---|
| 137 | |
---|
| 138 | _gp = ALIGN(16) + 0x8000; |
---|
| 139 | __global = _gp; |
---|
| 140 | |
---|
| 141 | .sdata : { |
---|
| 142 | *(.sdata) |
---|
| 143 | *(.sdata.*) |
---|
| 144 | *(.gnu.linkonce.s*) |
---|
| 145 | } |
---|
| 146 | .lit8 : { |
---|
| 147 | *(.lit8) |
---|
| 148 | } |
---|
| 149 | .lit4 : { |
---|
| 150 | *(.lit4) |
---|
| 151 | } |
---|
| 152 | |
---|
| 153 | edata = .; |
---|
| 154 | _edata = .; |
---|
| 155 | _fbss = .; |
---|
| 156 | |
---|
| 157 | .sbss : { |
---|
| 158 | *(.sbss) |
---|
| 159 | *(.scommon) |
---|
| 160 | } |
---|
[2b2e3ef5] | 161 | .bss : { |
---|
[4ba5ac6] | 162 | _bss_start = . ; |
---|
| 163 | *(.bss) |
---|
| 164 | *(COMMON) |
---|
| 165 | . = ALIGN (64); |
---|
| 166 | _stack_limit = .; |
---|
| 167 | . += _StackSize; |
---|
| 168 | __stack = .; |
---|
| 169 | _stack_init = .; |
---|
| 170 | end = .; |
---|
| 171 | _end = .; |
---|
[2bd5103] | 172 | WorkAreaBase = .; |
---|
[4ba5ac6] | 173 | } |
---|
| 174 | |
---|
| 175 | |
---|
| 176 | /* Debug sections. These should never be loadable, but they must have |
---|
| 177 | zero addresses for the debuggers to work correctly. */ |
---|
| 178 | .line 0 : { *(.line) } |
---|
| 179 | .debug 0 : { *(.debug) } |
---|
| 180 | .debug_sfnames 0 : { *(.debug_sfnames) } |
---|
| 181 | .debug_srcinfo 0 : { *(.debug_srcinfo) } |
---|
| 182 | .debug_macinfo 0 : { *(.debug_macinfo) } |
---|
| 183 | .debug_pubnames 0 : { *(.debug_pubnames) } |
---|
| 184 | .debug_aranges 0 : { *(.debug_aranges) } |
---|
| 185 | } |
---|