u-boot.lds 3.5 KB

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