[61f8fb0e] | 1 | OUTPUT_FORMAT("elf32-bfin", "elf32-bfin", |
---|
| 2 | "elf32-bfin") |
---|
| 3 | |
---|
| 4 | OUTPUT_ARCH(bfin) |
---|
| 5 | ENTRY(__start) |
---|
[8870da8] | 6 | STARTUP(start.o) |
---|
[61f8fb0e] | 7 | |
---|
| 8 | /* |
---|
| 9 | * Declare some sizes. |
---|
| 10 | */ |
---|
| 11 | _RamBase = DEFINED(_RamBase) ? _RamBase : 0x0; |
---|
[64501892] | 12 | /* bf537stamp has 64MB ram, but dynamic mmu tables have not yet been |
---|
| 13 | implemented. there are not enough static entries to support 64MB |
---|
| 14 | along with banks for io and flash, so waste some RAM at the end |
---|
| 15 | to free up mmu entries. */ |
---|
| 16 | _RamSize = DEFINED(_RamSize) ? _RamSize : 0x03400000; |
---|
[2a65e6d5] | 17 | _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0; |
---|
[61f8fb0e] | 18 | _StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000; |
---|
| 19 | |
---|
| 20 | MEMORY |
---|
| 21 | { |
---|
| 22 | sdram(rwx) : ORIGIN = 0x00001000, LENGTH = 0x03fff000 |
---|
| 23 | /* |
---|
| 24 | l1code(rwx) : ORIGIN = 0xffa08000, LENGTH = 0x00008000 |
---|
| 25 | l1data(rwx) : ORIGIN = 0xff804000, LENGTH = 0x00004000 |
---|
| 26 | */ |
---|
| 27 | } |
---|
| 28 | |
---|
| 29 | SECTIONS |
---|
| 30 | { |
---|
| 31 | |
---|
| 32 | /* |
---|
| 33 | .l1code : |
---|
| 34 | { |
---|
| 35 | */ |
---|
| 36 | /*jump.o (.text)*/ |
---|
| 37 | /* |
---|
| 38 | } > l1code |
---|
| 39 | */ |
---|
| 40 | |
---|
| 41 | .init : |
---|
| 42 | { |
---|
| 43 | *(.start) |
---|
| 44 | KEEP (*(.init)) |
---|
| 45 | } > sdram /*=0*/ |
---|
| 46 | |
---|
| 47 | .text : |
---|
| 48 | { |
---|
| 49 | CREATE_OBJECT_SYMBOLS |
---|
| 50 | *(.text) |
---|
| 51 | *(.rodata*) |
---|
| 52 | *(.gnu.linkonce.r*) |
---|
| 53 | |
---|
| 54 | /* |
---|
| 55 | * Special FreeBSD sysctl sections. |
---|
| 56 | */ |
---|
| 57 | . = ALIGN (16); |
---|
| 58 | ___start_set_sysctl_set = .; |
---|
| 59 | *(set_sysctl_*); |
---|
| 60 | ___stop_set_sysctl_set = ABSOLUTE(.); |
---|
| 61 | *(set_domain_*); |
---|
| 62 | *(set_pseudo_*); |
---|
| 63 | |
---|
| 64 | _etext = .; |
---|
| 65 | |
---|
| 66 | ___CTOR_LIST__ = .; |
---|
| 67 | LONG((___CTOR_END__ - ___CTOR_LIST__) / 4 - 2) |
---|
| 68 | *(.ctors) |
---|
| 69 | LONG(0) |
---|
| 70 | ___CTOR_END__ = .; |
---|
| 71 | ___DTOR_LIST__ = .; |
---|
| 72 | LONG((___DTOR_END__ - ___DTOR_LIST__) / 4 - 2) |
---|
| 73 | *(.dtors) |
---|
| 74 | LONG(0) |
---|
| 75 | ___DTOR_END__ = .; |
---|
| 76 | } > sdram |
---|
[960fd85] | 77 | |
---|
| 78 | .tdata : { |
---|
| 79 | __TLS_Data_begin = .; |
---|
| 80 | *(.tdata .tdata.* .gnu.linkonce.td.*) |
---|
| 81 | __TLS_Data_end = .; |
---|
| 82 | } > sdram |
---|
| 83 | |
---|
| 84 | .tbss : { |
---|
| 85 | __TLS_BSS_begin = .; |
---|
| 86 | *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) |
---|
| 87 | __TLS_BSS_end = .; |
---|
| 88 | } > sdram |
---|
| 89 | |
---|
| 90 | __TLS_Data_size = __TLS_Data_end - __TLS_Data_begin; |
---|
[d60e760] | 91 | __TLS_Data_begin = __TLS_Data_size != 0 ? __TLS_Data_begin : __TLS_BSS_begin; |
---|
| 92 | __TLS_Data_end = __TLS_Data_size != 0 ? __TLS_Data_end : __TLS_BSS_begin; |
---|
[960fd85] | 93 | __TLS_BSS_size = __TLS_BSS_end - __TLS_BSS_begin; |
---|
| 94 | __TLS_Size = __TLS_BSS_end - __TLS_Data_begin; |
---|
[d60e760] | 95 | __TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss)); |
---|
[61f8fb0e] | 96 | |
---|
| 97 | .fini : |
---|
| 98 | { |
---|
| 99 | KEEP (*(.fini)) |
---|
| 100 | } > sdram /*=0*/ |
---|
| 101 | |
---|
| 102 | .data : |
---|
| 103 | { |
---|
| 104 | *(.data) |
---|
[b618d8c] | 105 | KEEP (*(SORT(.rtemsrwset.*))) |
---|
[61f8fb0e] | 106 | *(.jcr) |
---|
| 107 | *(.gnu.linkonce.d*) |
---|
| 108 | CONSTRUCTORS |
---|
| 109 | _edata = .; |
---|
| 110 | } > sdram |
---|
| 111 | |
---|
| 112 | .eh_frame : { *(.eh_frame) } > sdram |
---|
| 113 | .data1 : { *(.data1) } > sdram |
---|
| 114 | .eh_frame : { *(.eh_frame) } > sdram |
---|
| 115 | .gcc_except_table : { *(.gcc_except_table*) } > sdram |
---|
| 116 | |
---|
| 117 | .rodata : |
---|
| 118 | { |
---|
| 119 | *(.rodata) |
---|
| 120 | *(.rodata.*) |
---|
[b618d8c] | 121 | KEEP (*(SORT(.rtemsroset.*))) |
---|
[61f8fb0e] | 122 | *(.gnu.linkonce.r*) |
---|
| 123 | } > sdram |
---|
| 124 | |
---|
| 125 | |
---|
| 126 | .bss : |
---|
| 127 | { |
---|
| 128 | _bss_start = .; |
---|
| 129 | _clear_start = .; |
---|
| 130 | *(.bss) |
---|
| 131 | *(.gnu.linkonce.b.*) |
---|
| 132 | *(COMMON) |
---|
| 133 | . = ALIGN (64); |
---|
| 134 | _stack_init = .; |
---|
| 135 | . += _StackSize; |
---|
| 136 | _clear_end = .; |
---|
[2a65e6d5] | 137 | _WorkAreaBase = .; |
---|
[61f8fb0e] | 138 | _end = .; |
---|
| 139 | __end = .; |
---|
| 140 | } > sdram |
---|
| 141 | |
---|
| 142 | /* Debugging stuff follows */ |
---|
| 143 | |
---|
| 144 | /* Stabs debugging sections. */ |
---|
| 145 | .stab 0 : { *(.stab) } |
---|
| 146 | .stabstr 0 : { *(.stabstr) } |
---|
| 147 | .stab.excl 0 : { *(.stab.excl) } |
---|
| 148 | .stab.exclstr 0 : { *(.stab.exclstr) } |
---|
| 149 | .stab.index 0 : { *(.stab.index) } |
---|
| 150 | .stab.indexstr 0 : { *(.stab.indexstr) } |
---|
| 151 | .comment 0 : { *(.comment) } |
---|
| 152 | /* DWARF debug sections. |
---|
| 153 | Symbols in the DWARF debugging sections are relative to the beginning |
---|
| 154 | of the section so we begin them at 0. */ |
---|
| 155 | /* DWARF 1 */ |
---|
| 156 | .debug 0 : { *(.debug) } |
---|
| 157 | .line 0 : { *(.line) } |
---|
| 158 | /* GNU DWARF 1 extensions */ |
---|
| 159 | .debug_srcinfo 0 : { *(.debug_srcinfo) } |
---|
| 160 | .debug_sfnames 0 : { *(.debug_sfnames) } |
---|
| 161 | /* DWARF 1.1 and DWARF 2 */ |
---|
| 162 | .debug_aranges 0 : { *(.debug_aranges) } |
---|
| 163 | .debug_pubnames 0 : { *(.debug_pubnames) } |
---|
| 164 | /* DWARF 2 */ |
---|
| 165 | .debug_info 0 : { *(.debug_info) } |
---|
| 166 | .debug_abbrev 0 : { *(.debug_abbrev) } |
---|
| 167 | .debug_line 0 : { *(.debug_line) } |
---|
| 168 | .debug_frame 0 : { *(.debug_frame) } |
---|
| 169 | .debug_str 0 : { *(.debug_str) } |
---|
| 170 | .debug_loc 0 : { *(.debug_loc) } |
---|
| 171 | .debug_macinfo 0 : { *(.debug_macinfo) } |
---|
| 172 | /* SGI/MIPS DWARF 2 extensions */ |
---|
| 173 | .debug_weaknames 0 : { *(.debug_weaknames) } |
---|
| 174 | .debug_funcnames 0 : { *(.debug_funcnames) } |
---|
| 175 | .debug_typenames 0 : { *(.debug_typenames) } |
---|
| 176 | .debug_varnames 0 : { *(.debug_varnames) } |
---|
| 177 | /*.stack 0x80000 : { _stack = .; *(.stack) }*/ |
---|
| 178 | /* These must appear regardless of . */ |
---|
| 179 | } |
---|
| 180 | |
---|
| 181 | __RamBase = _RamBase; |
---|
| 182 | __RamSize = _RamSize; |
---|
| 183 | __edata = _edata; |
---|
| 184 | __etext = _etext; |
---|