u-boot.lds 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. /* Linker script for Gaisler Research AB's GR-XC3S-1500 board
  2. * with template design.
  3. *
  4. * (C) Copyright 2007
  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. cpu/leon3/start.o (.text)
  60. /* 8k is the same as the PROM offset from end of main memory, (CFG_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. *(.rodata)
  77. *(.rodata1)
  78. *(.rodata.*)
  79. *(.eh_frame)
  80. }
  81. . = ALIGN(4);
  82. _etext = .;
  83. /* CMD Table */
  84. __u_boot_cmd_start = .;
  85. .u_boot_cmd : { *(.u_boot_cmd) }
  86. . = ALIGN(4);
  87. __u_boot_cmd_end = .;
  88. .data :
  89. {
  90. *(.data)
  91. *(.data1)
  92. *(.data.rel)
  93. *(.data.rel.*)
  94. *(.sdata)
  95. *(.sdata2)
  96. *(.dynamic)
  97. CONSTRUCTORS
  98. }
  99. _edata = .;
  100. PROVIDE (edata = .);
  101. . = ALIGN(4);
  102. __got_start = .;
  103. .got : {
  104. *(.got)
  105. /* *(.data.rel)
  106. *(.data.rel.local)*/
  107. . = ALIGN(16);
  108. }
  109. __got_end = .;
  110. /* .data.rel : { } */
  111. . = ALIGN(4096);
  112. __init_begin = .;
  113. .text.init : { *(.text.init) }
  114. .data.init : { *(.data.init) }
  115. . = ALIGN(4096);
  116. __init_end = .;
  117. __bss_start = .;
  118. .bss :
  119. {
  120. *(.sbss) *(.scommon)
  121. *(.dynbss)
  122. *(.bss)
  123. *(COMMON)
  124. . = ALIGN(16); /* to speed clearing of bss up */
  125. }
  126. __bss_end = . ;
  127. _end = . ;
  128. PROVIDE (end = .);
  129. /* Relocated into main memory */
  130. /* Start of main memory */
  131. /*. = 0x40000000;*/
  132. .stack (NOLOAD) : { *(.stack) }
  133. /* PROM CODE */
  134. /* global data in RAM passed to kernel after booting */
  135. .stab 0 : { *(.stab) }
  136. .stabstr 0 : { *(.stabstr) }
  137. .stab.excl 0 : { *(.stab.excl) }
  138. .stab.exclstr 0 : { *(.stab.exclstr) }
  139. .stab.index 0 : { *(.stab.index) }
  140. .stab.indexstr 0 : { *(.stab.indexstr) }
  141. .comment 0 : { *(.comment) }
  142. }