u-boot.lds 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. /* Linker script for Gaisler Research AB's Template design
  2. * for Altera NIOS Development board Stratix II Edition, EP2S60 FPGA.
  3. *
  4. * (C) Copyright 2008
  5. * Daniel Hellstrom, Gaisler Research, daniel@gaisler.com.
  6. *
  7. * See file CREDITS for list of people who contributed to this
  8. * project.
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of
  13. * the License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  23. * MA 02111-1307 USA
  24. *
  25. */
  26. OUTPUT_FORMAT("elf32-sparc", "elf32-sparc", "elf32-sparc")
  27. OUTPUT_ARCH(sparc)
  28. ENTRY(_start)
  29. SECTIONS
  30. {
  31. /* Read-only sections, merged into text segment: */
  32. . = + SIZEOF_HEADERS;
  33. .interp : { *(.interp) }
  34. .hash : { *(.hash) }
  35. .dynsym : { *(.dynsym) }
  36. .dynstr : { *(.dynstr) }
  37. .rel.text : { *(.rel.text) }
  38. .rela.text : { *(.rela.text) }
  39. .rel.data : { *(.rel.data) }
  40. .rela.data : { *(.rela.data) }
  41. .rel.rodata : { *(.rel.rodata) }
  42. .rela.rodata : { *(.rela.rodata) }
  43. .rel.got : { *(.rel.got) }
  44. .rela.got : { *(.rela.got) }
  45. .rel.ctors : { *(.rel.ctors) }
  46. .rela.ctors : { *(.rela.ctors) }
  47. .rel.dtors : { *(.rel.dtors) }
  48. .rela.dtors : { *(.rela.dtors) }
  49. .rel.bss : { *(.rel.bss) }
  50. .rela.bss : { *(.rela.bss) }
  51. .rel.plt : { *(.rel.plt) }
  52. .rela.plt : { *(.rela.plt) }
  53. .init : { *(.init) }
  54. .plt : { *(.plt) }
  55. .text : {
  56. _load_addr = .;
  57. _text = .;
  58. *(.start)
  59. arch/sparc/cpu/leon3/start.o (.text)
  60. /* 8k is the same as the PROM offset from end of main memory, (CONFIG_SYS_PROM_SIZE) */
  61. . = ALIGN(8192);
  62. /* PROM CODE, Will be relocated to the end of memory,
  63. * no global data accesses please.
  64. */
  65. __prom_start = .;
  66. *(.prom.pgt)
  67. *(.prom.data)
  68. *(.prom.text)
  69. . = ALIGN(16);
  70. __prom_end = .;
  71. *(.text)
  72. *(.fixup)
  73. *(.gnu.warning)
  74. /* *(.got1)*/
  75. . = ALIGN(16);
  76. *(.eh_frame)
  77. *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
  78. }
  79. . = ALIGN(4);
  80. _etext = .;
  81. /* CMD Table */
  82. __u_boot_cmd_start = .;
  83. .u_boot_cmd : { *(.u_boot_cmd) }
  84. . = ALIGN(4);
  85. __u_boot_cmd_end = .;
  86. .data :
  87. {
  88. *(.data)
  89. *(.data1)
  90. *(.data.rel)
  91. *(.data.rel.*)
  92. *(.sdata)
  93. *(.sdata2)
  94. *(.dynamic)
  95. CONSTRUCTORS
  96. }
  97. _edata = .;
  98. PROVIDE (edata = .);
  99. . = ALIGN(4);
  100. __got_start = .;
  101. .got : {
  102. *(.got)
  103. /* *(.data.rel)
  104. *(.data.rel.local)*/
  105. . = ALIGN(16);
  106. }
  107. __got_end = .;
  108. /* .data.rel : { } */
  109. . = ALIGN(4096);
  110. __init_begin = .;
  111. .text.init : { *(.text.init) }
  112. .data.init : { *(.data.init) }
  113. . = ALIGN(4096);
  114. __init_end = .;
  115. __bss_start = .;
  116. .bss :
  117. {
  118. *(.sbss) *(.scommon)
  119. *(.dynbss)
  120. *(.bss)
  121. *(COMMON)
  122. . = ALIGN(16); /* to speed clearing of bss up */
  123. }
  124. __bss_end = . ;
  125. __bss_end__ = . ;
  126. PROVIDE (end = .);
  127. /* Relocated into main memory */
  128. /* Start of main memory */
  129. /*. = 0x40000000;*/
  130. .stack (NOLOAD) : { *(.stack) }
  131. /* PROM CODE */
  132. /* global data in RAM passed to kernel after booting */
  133. .stab 0 : { *(.stab) }
  134. .stabstr 0 : { *(.stabstr) }
  135. .stab.excl 0 : { *(.stab.excl) }
  136. .stab.exclstr 0 : { *(.stab.exclstr) }
  137. .stab.index 0 : { *(.stab.index) }
  138. .stab.indexstr 0 : { *(.stab.indexstr) }
  139. .comment 0 : { *(.comment) }
  140. }