1 /* WARNING: automatically generated from the default pru-ld script! */ 2 3 4 5 /* Default linker script, for normal executables */ 6 OUTPUT_FORMAT("elf32-pru","elf32-pru","elf32-pru") OUTPUT_ARCH(pru)7OUTPUT_ARCH(pru) 8 MEMORY 9 { 10 imem (x) : ORIGIN = 0x20000000, LENGTH = 256K 11 dmem (rw!x) : ORIGIN = 0x0, LENGTH = 65536K 12 } 13 __HEAP_SIZE = DEFINED(__HEAP_SIZE) ? __HEAP_SIZE : 32 * 1024 * 1024 ; 14 __STACK_SIZE = DEFINED(__STACK_SIZE) ? __STACK_SIZE : 1024 * 1024 ; 15 PROVIDE (_stack_top = ORIGIN(dmem) + LENGTH(dmem)); ENTRY(_start)16ENTRY (_start) 17 SECTIONS 18 { 19 /* Read-only sections, merged into text segment: */ 20 .hash : { *(.hash) } 21 .dynsym : { *(.dynsym) } 22 .dynstr : { *(.dynstr) } 23 .gnu.version : { *(.gnu.version) } 24 .gnu.version_d : { *(.gnu.version_d) } 25 .gnu.version_r : { *(.gnu.version_r) } 26 .rel.init : { *(.rel.init) } 27 .rela.init : { *(.rela.init) } 28 .rel.text : 29 { 30 *(.rel.text) 31 *(.rel.text.*) 32 *(.rel.text:*) 33 *(.rel.gnu.linkonce.t*) 34 } 35 .rela.text : 36 { 37 *(.rela.text) 38 *(.rela.text.*) 39 *(.rela.text:*) 40 *(.rela.gnu.linkonce.t*) 41 } 42 .rel.fini : { *(.rel.fini) } 43 .rela.fini : { *(.rela.fini) } 44 .rel.rodata : 45 { 46 *(.rel.rodata) 47 *(.rel.rodata.*) 48 *(.rel.rodata:*) 49 *(.rel.gnu.linkonce.r*) 50 } 51 .rela.rodata : 52 { 53 *(.rela.rodata) 54 *(.rela.rodata.*) 55 *(.rela.rodata:*) 56 *(.rela.gnu.linkonce.r*) 57 } 58 .rel.data : 59 { 60 *(.rel.data) 61 *(.rel.data.*) 62 *(.rel.data:*) 63 *(.rel.gnu.linkonce.d*) 64 } 65 .rela.data : 66 { 67 *(.rela.data) 68 *(.rela.data.*) 69 *(.rela.data:*) 70 *(.rela.gnu.linkonce.d*) 71 } 72 .rel.init_array : { *(.rel.init_array) } 73 .rela.init_array : { *(.rela.init_array) } 74 .rel.fini_array : { *(.rel.fini_array) } 75 .rela.fini_array : { *(.rela.fini_array) } 76 .rel.got : { *(.rel.got) } 77 .rela.got : { *(.rela.got) } 78 .rel.bss : { *(.rel.bss) } 79 .rela.bss : { *(.rela.bss) } 80 .rel.plt : { *(.rel.plt) } 81 .rela.plt : { *(.rela.plt) } 82 /* Internal text space. */ 83 .text : 84 { 85 _text_start = . ; 86 . = ALIGN(4); 87 *(.init0) /* Start here after reset. */ 88 KEEP (*(.init0)) 89 . = ALIGN(4); 90 *(.text) 91 . = ALIGN(4); 92 *(.text.*) 93 . = ALIGN(4); 94 *(.text:*) 95 . = ALIGN(4); 96 *(.gnu.linkonce.t*) 97 . = ALIGN(4); 98 _text_end = . ; 99 } > imem 100 .data : 101 { 102 /* Optional variable that user is prepared to have NULL address. */ 103 *(.data.atzero*) 104 /* CRT is prepared for constructor/destructor table to have 105 a "valid" NULL address. */ 106 __init_array_start = . ; 107 KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*))) 108 KEEP (*(.init_array)) 109 __init_array_end = . ; 110 __fini_array_start = . ; 111 KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*))) 112 KEEP (*(.fini_array)) 113 __fini_array_end = . ; 114 /* DATA memory starts at address 0. So to avoid placing a valid static 115 variable at the invalid NULL address, we introduce the .data.atzero 116 section. If CRT can make some use of it - great. Otherwise skip a 117 word. In all cases .data/.bss sections must start at non-zero. */ 118 . += (. == 0 ? 4 : 0); 119 PROVIDE (_data_start = .) ; 120 *(.data) 121 *(.data*) 122 *(.data:*) 123 *(.rodata) /* We need to include .rodata here if gcc is used. */ 124 *(.rodata.*) /* with -fdata-sections. */ 125 *(.rodata:*) 126 *(.gnu.linkonce.d*) 127 *(.gnu.linkonce.r*) 128 . = ALIGN(4); 129 PROVIDE (_data_end = .) ; 130 } > dmem 131 .resource_table : 132 { 133 KEEP (*(.resource_table)) 134 } > dmem 135 .bss : 136 { 137 PROVIDE (_bss_start = .) ; 138 *(.bss) 139 *(.bss.*) 140 *(.bss:*) 141 *(.gnu.linkonce.b*) 142 *(COMMON) 143 PROVIDE (_bss_end = .) ; 144 } > dmem 145 /* Global data not cleared after reset. */ 146 .noinit : 147 { 148 PROVIDE (_noinit_start = .) ; 149 *(.noinit) 150 PROVIDE (_noinit_end = .) ; 151 PROVIDE (_heap_start = .) ; 152 . += __HEAP_SIZE ; 153 /* Stack is not here really. It will be put at the end of DMEM. 154 But we take into account its size here, in order to allow 155 for MEMORY overflow checking during link time. */ 156 . += __STACK_SIZE ; 157 } > dmem 158 /* Stabs debugging sections. */ 159 .stab 0 : { *(.stab) } 160 .stabstr 0 : { *(.stabstr) } 161 .stab.excl 0 : { *(.stab.excl) } 162 .stab.exclstr 0 : { *(.stab.exclstr) } 163 .stab.index 0 : { *(.stab.index) } 164 .stab.indexstr 0 : { *(.stab.indexstr) } 165 .comment 0 : { *(.comment) } 166 .note.gnu.build-id : { *(.note.gnu.build-id) } 167 /* DWARF debug sections. 168 Symbols in the DWARF debugging sections are relative to the beginning 169 of the section so we begin them at 0. */ 170 /* DWARF 1 */ 171 .debug 0 : { *(.debug) } 172 .line 0 : { *(.line) } 173 /* GNU DWARF 1 extensions */ 174 .debug_srcinfo 0 : { *(.debug_srcinfo) } 175 .debug_sfnames 0 : { *(.debug_sfnames) } 176 /* DWARF 1.1 and DWARF 2 */ 177 .debug_aranges 0 : { *(.debug_aranges) } 178 .debug_pubnames 0 : { *(.debug_pubnames) } 179 /* DWARF 2 */ 180 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } 181 .debug_abbrev 0 : { *(.debug_abbrev) } 182 .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end) } 183 .debug_frame 0 : { *(.debug_frame) } 184 .debug_str 0 : { *(.debug_str) } 185 .debug_loc 0 : { *(.debug_loc) } 186 .debug_macinfo 0 : { *(.debug_macinfo) } 187 /* SGI/MIPS DWARF 2 extensions */ 188 .debug_weaknames 0 : { *(.debug_weaknames) } 189 .debug_funcnames 0 : { *(.debug_funcnames) } 190 .debug_typenames 0 : { *(.debug_typenames) } 191 .debug_varnames 0 : { *(.debug_varnames) } 192 /* DWARF 3 */ 193 .debug_pubtypes 0 : { *(.debug_pubtypes) } 194 .debug_ranges 0 : { *(.debug_ranges) } 195 /* DWARF Extension. */ 196 .debug_macro 0 : { *(.debug_macro) } 197 .debug_addr 0 : { *(.debug_addr) } 198 } 199 200 201