u-boot.lds 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. /*
  2. * (C) Copyright 2007-2008
  3. * Daniel Hellstrom, Gaisler Research, daniel@gaisler.com.
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. OUTPUT_FORMAT("elf32-sparc", "elf32-sparc", "elf32-sparc")
  8. OUTPUT_ARCH(sparc)
  9. ENTRY(_start)
  10. SECTIONS
  11. {
  12. /* Read-only sections, merged into text segment: */
  13. . = + SIZEOF_HEADERS;
  14. .interp : { *(.interp) }
  15. .hash : { *(.hash) }
  16. .dynsym : { *(.dynsym) }
  17. .dynstr : { *(.dynstr) }
  18. .rel.text : { *(.rel.text) }
  19. .rela.text : { *(.rela.text) }
  20. .rel.data : { *(.rel.data) }
  21. .rela.data : { *(.rela.data) }
  22. .rel.rodata : { *(.rel.rodata) }
  23. .rela.rodata : { *(.rela.rodata) }
  24. .rel.got : { *(.rel.got) }
  25. .rela.got : { *(.rela.got) }
  26. .rel.ctors : { *(.rel.ctors) }
  27. .rela.ctors : { *(.rela.ctors) }
  28. .rel.dtors : { *(.rel.dtors) }
  29. .rela.dtors : { *(.rela.dtors) }
  30. .rel.bss : { *(.rel.bss) }
  31. .rela.bss : { *(.rela.bss) }
  32. .rel.plt : { *(.rel.plt) }
  33. .rela.plt : { *(.rela.plt) }
  34. .init : { *(.init) }
  35. .plt : { *(.plt) }
  36. .text : {
  37. _load_addr = .;
  38. _text = .;
  39. *(.start)
  40. */start.o (.text)
  41. /* 8k is the same as the PROM offset from end of main memory, (CONFIG_SYS_PROM_SIZE) */
  42. . = ALIGN(8192);
  43. /* PROM CODE, Will be relocated to the end of memory,
  44. * no global data accesses please.
  45. */
  46. __prom_start = .;
  47. *(.prom.pgt)
  48. *(.prom.data)
  49. *(.prom.text)
  50. . = ALIGN(16);
  51. __prom_end = .;
  52. *(.text)
  53. *(.fixup)
  54. *(.gnu.warning)
  55. /* *(.got1)*/
  56. . = ALIGN(16);
  57. *(.eh_frame)
  58. *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
  59. }
  60. . = ALIGN(4);
  61. _etext = .;
  62. /* CMD Table */
  63. . = ALIGN(4);
  64. .u_boot_list : {
  65. KEEP(*(SORT(.u_boot_list*)));
  66. }
  67. .data :
  68. {
  69. *(.data)
  70. *(.data1)
  71. *(.data.rel)
  72. *(.data.rel.*)
  73. *(.sdata)
  74. *(.sdata2)
  75. *(.dynamic)
  76. CONSTRUCTORS
  77. }
  78. _edata = .;
  79. PROVIDE (edata = .);
  80. . = ALIGN(4);
  81. __got_start = .;
  82. .got : {
  83. *(.got)
  84. /* *(.data.rel)
  85. *(.data.rel.local)*/
  86. . = ALIGN(16);
  87. }
  88. __got_end = .;
  89. /* .data.rel : { } */
  90. . = ALIGN(4096);
  91. __init_begin = .;
  92. .text.init : { *(.text.init) }
  93. .data.init : { *(.data.init) }
  94. . = ALIGN(4096);
  95. __init_end = .;
  96. __bss_start = .;
  97. .bss :
  98. {
  99. *(.sbss) *(.scommon)
  100. *(.dynbss)
  101. *(.bss)
  102. *(COMMON)
  103. . = ALIGN(16); /* to speed clearing of bss up */
  104. }
  105. __bss_end = . ;
  106. __bss_end = . ;
  107. PROVIDE (end = .);
  108. /* Relocated into main memory */
  109. /* Start of main memory */
  110. /*. = 0x40000000;*/
  111. .stack (NOLOAD) : { *(.stack) }
  112. /* PROM CODE */
  113. /* global data in RAM passed to kernel after booting */
  114. .stab 0 : { *(.stab) }
  115. .stabstr 0 : { *(.stabstr) }
  116. .stab.excl 0 : { *(.stab.excl) }
  117. .stab.exclstr 0 : { *(.stab.exclstr) }
  118. .stab.index 0 : { *(.stab.index) }
  119. .stab.indexstr 0 : { *(.stab.indexstr) }
  120. .comment 0 : { *(.comment) }
  121. }