Details | Last modification | View Log | SVN | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 181 | andfri | 1 | /* Default linker script, for normal executables */ |
| 2 | OUTPUT_FORMAT("elf32-avr","elf32-avr","elf32-avr") |
||
| 3 | OUTPUT_ARCH(avr:4) |
||
| 4 | MEMORY |
||
| 5 | { |
||
| 6 | text (rx) : ORIGIN = 0x0, LENGTH = 6K |
||
| 7 | data (rw!x) : ORIGIN = 0x800060, LENGTH = 1K |
||
| 8 | eeprom (rw!x) : ORIGIN = 0x810000, LENGTH = 512 |
||
| 9 | } |
||
| 10 | SECTIONS |
||
| 11 | { |
||
| 12 | /* Read-only sections, merged into text segment: */ |
||
| 13 | .hash : { *(.hash) } |
||
| 14 | .dynsym : { *(.dynsym) } |
||
| 15 | .dynstr : { *(.dynstr) } |
||
| 16 | .gnu.version : { *(.gnu.version) } |
||
| 17 | .gnu.version_d : { *(.gnu.version_d) } |
||
| 18 | .gnu.version_r : { *(.gnu.version_r) } |
||
| 19 | .rel.init : { *(.rel.init) } |
||
| 20 | .rela.init : { *(.rela.init) } |
||
| 21 | .rel.text : |
||
| 22 | { |
||
| 23 | *(.rel.text) |
||
| 24 | *(.rel.text.*) |
||
| 25 | *(.rel.gnu.linkonce.t*) |
||
| 26 | } |
||
| 27 | .rela.text : |
||
| 28 | { |
||
| 29 | *(.rela.text) |
||
| 30 | *(.rela.text.*) |
||
| 31 | *(.rela.gnu.linkonce.t*) |
||
| 32 | } |
||
| 33 | .rel.fini : { *(.rel.fini) } |
||
| 34 | .rela.fini : { *(.rela.fini) } |
||
| 35 | .rel.rodata : |
||
| 36 | { |
||
| 37 | *(.rel.rodata) |
||
| 38 | *(.rel.rodata.*) |
||
| 39 | *(.rel.gnu.linkonce.r*) |
||
| 40 | } |
||
| 41 | .rela.rodata : |
||
| 42 | { |
||
| 43 | *(.rela.rodata) |
||
| 44 | *(.rela.rodata.*) |
||
| 45 | *(.rela.gnu.linkonce.r*) |
||
| 46 | } |
||
| 47 | .rel.data : |
||
| 48 | { |
||
| 49 | *(.rel.data) |
||
| 50 | *(.rel.data.*) |
||
| 51 | *(.rel.gnu.linkonce.d*) |
||
| 52 | } |
||
| 53 | .rela.data : |
||
| 54 | { |
||
| 55 | *(.rela.data) |
||
| 56 | *(.rela.data.*) |
||
| 57 | *(.rela.gnu.linkonce.d*) |
||
| 58 | } |
||
| 59 | .rel.ctors : { *(.rel.ctors) } |
||
| 60 | .rela.ctors : { *(.rela.ctors) } |
||
| 61 | .rel.dtors : { *(.rel.dtors) } |
||
| 62 | .rela.dtors : { *(.rela.dtors) } |
||
| 63 | .rel.got : { *(.rel.got) } |
||
| 64 | .rela.got : { *(.rela.got) } |
||
| 65 | .rel.bss : { *(.rel.bss) } |
||
| 66 | .rela.bss : { *(.rela.bss) } |
||
| 67 | .rel.plt : { *(.rel.plt) } |
||
| 68 | .rela.plt : { *(.rela.plt) } |
||
| 69 | /* Internal text space or external memory */ |
||
| 70 | .text : |
||
| 71 | { |
||
| 72 | *(.vectors) |
||
| 73 | __ctors_start = . ; |
||
| 74 | *(.ctors) |
||
| 75 | __ctors_end = . ; |
||
| 76 | __dtors_start = . ; |
||
| 77 | *(.dtors) |
||
| 78 | __dtors_end = . ; |
||
| 79 | *(.progmem.gcc*) |
||
| 80 | *(.progmem*) |
||
| 81 | . = ALIGN(2); |
||
| 82 | *(.init0) /* Start here after reset. */ |
||
| 83 | *(.init1) |
||
| 84 | */ *(.init2) /* Clear __zero_reg__, set up stack pointer. */ |
||
| 85 | *(.init3) |
||
| 86 | *(.init4) /* Initialize data and BSS. */ |
||
| 87 | *(.init5) |
||
| 88 | *(.init6) /* C++ constructors. */ |
||
| 89 | *(.init7) |
||
| 90 | *(.init8) |
||
| 91 | *(.init9) /* Call main(). */ |
||
| 92 | *(.text) |
||
| 93 | . = ALIGN(2); |
||
| 94 | *(.text.*) |
||
| 95 | . = ALIGN(2); |
||
| 96 | *(.fini9) /* _exit() starts here. */ |
||
| 97 | *(.fini8) |
||
| 98 | *(.fini7) |
||
| 99 | *(.fini6) /* C++ destructors. */ |
||
| 100 | *(.fini5) |
||
| 101 | *(.fini4) |
||
| 102 | *(.fini3) |
||
| 103 | *(.fini2) |
||
| 104 | *(.fini1) |
||
| 105 | *(.fini0) /* Infinite loop after program termination. */ |
||
| 106 | _etext = . ; |
||
| 107 | } > text |
||
| 108 | .bios_interface : |
||
| 109 | { |
||
| 110 | PROVIDE (__bios_interface_start = .) ; |
||
| 111 | *(.bios_interface) |
||
| 112 | . = ALIGN(2); |
||
| 113 | PROVIDE (__bios_interface_end = .) ; |
||
| 114 | } > data |
||
| 228 | andfri | 115 | .data __bios_ram_end : AT (ADDR (.text) + SIZEOF (.text)) |
| 181 | andfri | 116 | { |
| 117 | PROVIDE (__data_start = .) ; |
||
| 118 | *(.data) |
||
| 119 | *(.gnu.linkonce.d*) |
||
| 120 | . = ALIGN(2); |
||
| 121 | _edata = . ; |
||
| 122 | PROVIDE (__data_end = .) ; |
||
| 123 | } > data |
||
| 124 | .bss SIZEOF(.data) + ADDR(.data) : |
||
| 125 | { |
||
| 126 | PROVIDE (__bss_start = .) ; |
||
| 127 | *(.bss) |
||
| 128 | *(COMMON) |
||
| 129 | PROVIDE (__bss_end = .) ; |
||
| 130 | } > data |
||
| 131 | __data_load_start = LOADADDR(.data); |
||
| 132 | __data_load_end = __data_load_start + SIZEOF(.data); |
||
| 133 | /* Global data not cleared after reset. */ |
||
| 134 | .noinit SIZEOF(.bss) + ADDR(.bss) : |
||
| 135 | { |
||
| 136 | PROVIDE (__noinit_start = .) ; |
||
| 137 | *(.noinit*) |
||
| 138 | PROVIDE (__noinit_end = .) ; |
||
| 139 | _end = . ; |
||
| 140 | PROVIDE (__heap_start = .) ; |
||
| 141 | } > data |
||
| 142 | .eeprom : |
||
| 143 | { |
||
| 144 | *(.eeprom*) |
||
| 145 | __eeprom_end = . ; |
||
| 146 | } > eeprom |
||
| 147 | /* Stabs debugging sections. */ |
||
| 148 | .stab 0 : { *(.stab) } |
||
| 149 | .stabstr 0 : { *(.stabstr) } |
||
| 150 | .stab.excl 0 : { *(.stab.excl) } |
||
| 151 | .stab.exclstr 0 : { *(.stab.exclstr) } |
||
| 152 | .stab.index 0 : { *(.stab.index) } |
||
| 153 | .stab.indexstr 0 : { *(.stab.indexstr) } |
||
| 154 | .comment 0 : { *(.comment) } |
||
| 155 | /* DWARF debug sections. |
||
| 156 | Symbols in the DWARF debugging sections are relative to the beginning |
||
| 157 | of the section so we begin them at 0. */ |
||
| 158 | /* DWARF 1 */ |
||
| 159 | .debug 0 : { *(.debug) } |
||
| 160 | .line 0 : { *(.line) } |
||
| 161 | /* GNU DWARF 1 extensions */ |
||
| 162 | .debug_srcinfo 0 : { *(.debug_srcinfo) } |
||
| 163 | .debug_sfnames 0 : { *(.debug_sfnames) } |
||
| 164 | /* DWARF 1.1 and DWARF 2 */ |
||
| 165 | .debug_aranges 0 : { *(.debug_aranges) } |
||
| 166 | .debug_pubnames 0 : { *(.debug_pubnames) } |
||
| 167 | /* DWARF 2 */ |
||
| 168 | .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) } |
||
| 169 | .debug_abbrev 0 : { *(.debug_abbrev) } |
||
| 170 | .debug_line 0 : { *(.debug_line) } |
||
| 171 | .debug_frame 0 : { *(.debug_frame) } |
||
| 172 | .debug_str 0 : { *(.debug_str) } |
||
| 173 | .debug_loc 0 : { *(.debug_loc) } |
||
| 174 | .debug_macinfo 0 : { *(.debug_macinfo) } |
||
| 175 | } |