Studentenversion des ESY6/A Praktikums "signal_processing".
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

linker.x 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. /*
  2. * linker.x - Linker script
  3. *
  4. * Machine generated for CPU 'core' in SOPC Builder design 'niosII'
  5. * SOPC Builder design path: ../../niosII.sopcinfo
  6. *
  7. * Generated: Wed Nov 20 10:02:14 CET 2024
  8. */
  9. /*
  10. * DO NOT MODIFY THIS FILE
  11. *
  12. * Changing this file will have subtle consequences
  13. * which will almost certainly lead to a nonfunctioning
  14. * system. If you do modify this file, be aware that your
  15. * changes will be overwritten and lost when this file
  16. * is generated again.
  17. *
  18. * DO NOT MODIFY THIS FILE
  19. */
  20. /*
  21. * License Agreement
  22. *
  23. * Copyright (c) 2008
  24. * Altera Corporation, San Jose, California, USA.
  25. * All rights reserved.
  26. *
  27. * Permission is hereby granted, free of charge, to any person obtaining a
  28. * copy of this software and associated documentation files (the "Software"),
  29. * to deal in the Software without restriction, including without limitation
  30. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  31. * and/or sell copies of the Software, and to permit persons to whom the
  32. * Software is furnished to do so, subject to the following conditions:
  33. *
  34. * The above copyright notice and this permission notice shall be included in
  35. * all copies or substantial portions of the Software.
  36. *
  37. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  38. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  39. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  40. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  41. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  42. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  43. * DEALINGS IN THE SOFTWARE.
  44. *
  45. * This agreement shall be governed in all respects by the laws of the State
  46. * of California and by the laws of the United States of America.
  47. */
  48. MEMORY
  49. {
  50. ram : ORIGIN = 0x20000, LENGTH = 131072
  51. reset : ORIGIN = 0x40000, LENGTH = 32
  52. rom : ORIGIN = 0x40020, LENGTH = 131040
  53. }
  54. /* Define symbols for each memory base-address */
  55. __alt_mem_ram = 0x20000;
  56. __alt_mem_rom = 0x40000;
  57. OUTPUT_FORMAT( "elf32-littlenios2",
  58. "elf32-littlenios2",
  59. "elf32-littlenios2" )
  60. OUTPUT_ARCH( nios2 )
  61. ENTRY( _start )
  62. /*
  63. * The alt_load() facility is enabled. This typically happens when there isn't
  64. * an external bootloader (e.g. flash bootloader).
  65. * The LMA (aka physical address) of each loaded section is
  66. * set to the .text memory device.
  67. * The HAL alt_load() routine called from crt0 copies sections from
  68. * the .text memory to RAM as needed.
  69. */
  70. SECTIONS
  71. {
  72. /*
  73. * Output sections associated with reset and exceptions (they have to be first)
  74. */
  75. .entry :
  76. {
  77. KEEP (*(.entry))
  78. } > reset
  79. .exceptions :
  80. {
  81. PROVIDE (__ram_exceptions_start = ABSOLUTE(.));
  82. . = ALIGN(0x20);
  83. KEEP (*(.irq));
  84. KEEP (*(.exceptions.entry.label));
  85. KEEP (*(.exceptions.entry.user));
  86. KEEP (*(.exceptions.entry.ecc_fatal));
  87. KEEP (*(.exceptions.entry));
  88. KEEP (*(.exceptions.irqtest.user));
  89. KEEP (*(.exceptions.irqtest));
  90. KEEP (*(.exceptions.irqhandler.user));
  91. KEEP (*(.exceptions.irqhandler));
  92. KEEP (*(.exceptions.irqreturn.user));
  93. KEEP (*(.exceptions.irqreturn));
  94. KEEP (*(.exceptions.notirq.label));
  95. KEEP (*(.exceptions.notirq.user));
  96. KEEP (*(.exceptions.notirq));
  97. KEEP (*(.exceptions.soft.user));
  98. KEEP (*(.exceptions.soft));
  99. KEEP (*(.exceptions.unknown.user));
  100. KEEP (*(.exceptions.unknown));
  101. KEEP (*(.exceptions.exit.label));
  102. KEEP (*(.exceptions.exit.user));
  103. KEEP (*(.exceptions.exit));
  104. KEEP (*(.exceptions));
  105. PROVIDE (__ram_exceptions_end = ABSOLUTE(.));
  106. } > rom
  107. PROVIDE (__flash_exceptions_start = LOADADDR(.exceptions));
  108. .text :
  109. {
  110. /*
  111. * All code sections are merged into the text output section, along with
  112. * the read only data sections.
  113. *
  114. */
  115. PROVIDE (stext = ABSOLUTE(.));
  116. *(.interp)
  117. *(.hash)
  118. *(.dynsym)
  119. *(.dynstr)
  120. *(.gnu.version)
  121. *(.gnu.version_d)
  122. *(.gnu.version_r)
  123. *(.rel.init)
  124. *(.rela.init)
  125. *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
  126. *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
  127. *(.rel.fini)
  128. *(.rela.fini)
  129. *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
  130. *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
  131. *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
  132. *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
  133. *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
  134. *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
  135. *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
  136. *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
  137. *(.rel.ctors)
  138. *(.rela.ctors)
  139. *(.rel.dtors)
  140. *(.rela.dtors)
  141. *(.rel.got)
  142. *(.rela.got)
  143. *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*)
  144. *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
  145. *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*)
  146. *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
  147. *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*)
  148. *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
  149. *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*)
  150. *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
  151. *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
  152. *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
  153. *(.rel.plt)
  154. *(.rela.plt)
  155. *(.rel.dyn)
  156. KEEP (*(.init))
  157. *(.plt)
  158. *(.text .stub .text.* .gnu.linkonce.t.*)
  159. /* .gnu.warning sections are handled specially by elf32.em. */
  160. *(.gnu.warning.*)
  161. KEEP (*(.fini))
  162. PROVIDE (__etext = ABSOLUTE(.));
  163. PROVIDE (_etext = ABSOLUTE(.));
  164. PROVIDE (etext = ABSOLUTE(.));
  165. *(.eh_frame_hdr)
  166. /* Ensure the __preinit_array_start label is properly aligned. We
  167. could instead move the label definition inside the section, but
  168. the linker would then create the section even if it turns out to
  169. be empty, which isn't pretty. */
  170. . = ALIGN(4);
  171. PROVIDE (__preinit_array_start = ABSOLUTE(.));
  172. *(.preinit_array)
  173. PROVIDE (__preinit_array_end = ABSOLUTE(.));
  174. PROVIDE (__init_array_start = ABSOLUTE(.));
  175. *(.init_array)
  176. PROVIDE (__init_array_end = ABSOLUTE(.));
  177. PROVIDE (__fini_array_start = ABSOLUTE(.));
  178. *(.fini_array)
  179. PROVIDE (__fini_array_end = ABSOLUTE(.));
  180. SORT(CONSTRUCTORS)
  181. KEEP (*(.eh_frame))
  182. *(.gcc_except_table .gcc_except_table.*)
  183. *(.dynamic)
  184. PROVIDE (__CTOR_LIST__ = ABSOLUTE(.));
  185. KEEP (*(.ctors))
  186. KEEP (*(SORT(.ctors.*)))
  187. PROVIDE (__CTOR_END__ = ABSOLUTE(.));
  188. PROVIDE (__DTOR_LIST__ = ABSOLUTE(.));
  189. KEEP (*(.dtors))
  190. KEEP (*(SORT(.dtors.*)))
  191. PROVIDE (__DTOR_END__ = ABSOLUTE(.));
  192. KEEP (*(.jcr))
  193. . = ALIGN(4);
  194. } > rom = 0x3a880100 /* NOP instruction (always in big-endian byte ordering) */
  195. /*
  196. *
  197. * This section's LMA is set to the .text region.
  198. * crt0 will copy to this section's specified mapped region virtual memory address (VMA)
  199. *
  200. */
  201. .rodata : AT ( LOADADDR (.text) + SIZEOF (.text) )
  202. {
  203. PROVIDE (__ram_rodata_start = ABSOLUTE(.));
  204. . = ALIGN(4);
  205. *(.rodata .rodata.* .gnu.linkonce.r.*)
  206. *(.rodata1)
  207. . = ALIGN(4);
  208. PROVIDE (__ram_rodata_end = ABSOLUTE(.));
  209. } > ram
  210. PROVIDE (__flash_rodata_start = LOADADDR(.rodata));
  211. /*
  212. *
  213. * This section's LMA is set to the .text region.
  214. * crt0 will copy to this section's specified mapped region virtual memory address (VMA)
  215. *
  216. */
  217. .rwdata : AT ( LOADADDR (.rodata) + SIZEOF (.rodata) )
  218. {
  219. PROVIDE (__ram_rwdata_start = ABSOLUTE(.));
  220. . = ALIGN(4);
  221. *(.got.plt) *(.got)
  222. *(.data1)
  223. *(.data .data.* .gnu.linkonce.d.*)
  224. _gp = ABSOLUTE(. + 0x8000);
  225. PROVIDE(gp = _gp);
  226. *(.rwdata .rwdata.*)
  227. *(.sdata .sdata.* .gnu.linkonce.s.*)
  228. *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
  229. . = ALIGN(4);
  230. _edata = ABSOLUTE(.);
  231. PROVIDE (edata = ABSOLUTE(.));
  232. PROVIDE (__ram_rwdata_end = ABSOLUTE(.));
  233. } > ram
  234. PROVIDE (__flash_rwdata_start = LOADADDR(.rwdata));
  235. .bss :
  236. {
  237. __bss_start = ABSOLUTE(.);
  238. PROVIDE (__sbss_start = ABSOLUTE(.));
  239. PROVIDE (___sbss_start = ABSOLUTE(.));
  240. *(.dynsbss)
  241. *(.sbss .sbss.* .gnu.linkonce.sb.*)
  242. *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
  243. *(.scommon)
  244. PROVIDE (__sbss_end = ABSOLUTE(.));
  245. PROVIDE (___sbss_end = ABSOLUTE(.));
  246. *(.dynbss)
  247. *(.bss .bss.* .gnu.linkonce.b.*)
  248. *(COMMON)
  249. . = ALIGN(4);
  250. __bss_end = ABSOLUTE(.);
  251. } > ram
  252. /*
  253. *
  254. * One output section mapped to the associated memory device for each of
  255. * the available memory devices. These are not used by default, but can
  256. * be used by user applications by using the .section directive.
  257. *
  258. * The output section used for the heap is treated in a special way,
  259. * i.e. the symbols "end" and "_end" are added to point to the heap start.
  260. *
  261. * Because alt_load() is enabled, these sections have
  262. * their LMA set to be loaded into the .text memory region.
  263. * However, the alt_load() code will NOT automatically copy
  264. * these sections into their mapped memory region.
  265. *
  266. */
  267. /*
  268. *
  269. * This section's LMA is set to the .text region.
  270. * crt0 will copy to this section's specified mapped region virtual memory address (VMA)
  271. *
  272. */
  273. .ram : AT ( LOADADDR (.rwdata) + SIZEOF (.rwdata) )
  274. {
  275. PROVIDE (_alt_partition_ram_start = ABSOLUTE(.));
  276. *(.ram .ram. ram.*)
  277. . = ALIGN(4);
  278. PROVIDE (_alt_partition_ram_end = ABSOLUTE(.));
  279. _end = ABSOLUTE(.);
  280. end = ABSOLUTE(.);
  281. __alt_stack_base = ABSOLUTE(.);
  282. } > ram
  283. PROVIDE (_alt_partition_ram_load_addr = LOADADDR(.ram));
  284. /*
  285. *
  286. * This section's LMA is set to the .text region.
  287. * crt0 will copy to this section's specified mapped region virtual memory address (VMA)
  288. *
  289. */
  290. .rom LOADADDR (.ram) + SIZEOF (.ram) : AT ( LOADADDR (.ram) + SIZEOF (.ram) )
  291. {
  292. PROVIDE (_alt_partition_rom_start = ABSOLUTE(.));
  293. *(.rom .rom. rom.*)
  294. . = ALIGN(4);
  295. PROVIDE (_alt_partition_rom_end = ABSOLUTE(.));
  296. } > rom
  297. PROVIDE (_alt_partition_rom_load_addr = LOADADDR(.rom));
  298. /*
  299. * Stabs debugging sections.
  300. *
  301. */
  302. .stab 0 : { *(.stab) }
  303. .stabstr 0 : { *(.stabstr) }
  304. .stab.excl 0 : { *(.stab.excl) }
  305. .stab.exclstr 0 : { *(.stab.exclstr) }
  306. .stab.index 0 : { *(.stab.index) }
  307. .stab.indexstr 0 : { *(.stab.indexstr) }
  308. .comment 0 : { *(.comment) }
  309. /* DWARF debug sections.
  310. Symbols in the DWARF debugging sections are relative to the beginning
  311. of the section so we begin them at 0. */
  312. /* DWARF 1 */
  313. .debug 0 : { *(.debug) }
  314. .line 0 : { *(.line) }
  315. /* GNU DWARF 1 extensions */
  316. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  317. .debug_sfnames 0 : { *(.debug_sfnames) }
  318. /* DWARF 1.1 and DWARF 2 */
  319. .debug_aranges 0 : { *(.debug_aranges) }
  320. .debug_pubnames 0 : { *(.debug_pubnames) }
  321. /* DWARF 2 */
  322. .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
  323. .debug_abbrev 0 : { *(.debug_abbrev) }
  324. .debug_line 0 : { *(.debug_line) }
  325. .debug_frame 0 : { *(.debug_frame) }
  326. .debug_str 0 : { *(.debug_str) }
  327. .debug_loc 0 : { *(.debug_loc) }
  328. .debug_macinfo 0 : { *(.debug_macinfo) }
  329. /* SGI/MIPS DWARF 2 extensions */
  330. .debug_weaknames 0 : { *(.debug_weaknames) }
  331. .debug_funcnames 0 : { *(.debug_funcnames) }
  332. .debug_typenames 0 : { *(.debug_typenames) }
  333. .debug_varnames 0 : { *(.debug_varnames) }
  334. /* Altera debug extensions */
  335. .debug_alt_sim_info 0 : { *(.debug_alt_sim_info) }
  336. }
  337. /* provide a pointer for the stack */
  338. /*
  339. * Don't override this, override the __alt_stack_* symbols instead.
  340. */
  341. __alt_data_end = 0x40000;
  342. /*
  343. * The next two symbols define the location of the default stack. You can
  344. * override them to move the stack to a different memory.
  345. */
  346. PROVIDE( __alt_stack_pointer = __alt_data_end );
  347. PROVIDE( __alt_stack_limit = __alt_stack_base );
  348. /*
  349. * This symbol controls where the start of the heap is. If the stack is
  350. * contiguous with the heap then the stack will contract as memory is
  351. * allocated to the heap.
  352. * Override this symbol to put the heap in a different memory.
  353. */
  354. PROVIDE( __alt_heap_start = end );
  355. PROVIDE( __alt_heap_limit = 0x40000 );