u-boot-spl.lds 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. MEMORY { .spl_mem : ORIGIN = IMAGE_TEXT_BASE, \
  3. LENGTH = IMAGE_MAX_SIZE }
  4. MEMORY { .bss_mem : ORIGIN = CONFIG_SPL_BSS_START_ADDR, \
  5. LENGTH = CONFIG_SPL_BSS_MAX_SIZE }
  6. OUTPUT_ARCH(mips)
  7. ENTRY(_start)
  8. SECTIONS
  9. {
  10. . = 0x00000000;
  11. . = ALIGN(4);
  12. .text : {
  13. *(.text*)
  14. } > .spl_mem
  15. . = ALIGN(4);
  16. .rodata : {
  17. *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
  18. } > .spl_mem
  19. . = ALIGN(4);
  20. .data : {
  21. *(SORT_BY_ALIGNMENT(.data*))
  22. *(SORT_BY_ALIGNMENT(.sdata*))
  23. } > .spl_mem
  24. #if defined(CONFIG_SPL_DM) || defined(CONFIG_SPL_LOADER_SUPPORT)
  25. . = ALIGN(4);
  26. .u_boot_list : {
  27. KEEP(*(SORT(.u_boot_list*)));
  28. } > .spl_mem
  29. #endif
  30. . = ALIGN(4);
  31. __image_copy_end = .;
  32. _image_binary_end = .;
  33. .bss (NOLOAD) : {
  34. __bss_start = .;
  35. *(.bss*)
  36. *(.sbss*)
  37. *(COMMON)
  38. . = ALIGN(4);
  39. __bss_end = .;
  40. } > .bss_mem
  41. /* These mark the ABI of U-Boot for debuggers. */
  42. .mdebug.abi32 : {
  43. KEEP(*(.mdebug.abi32))
  44. }
  45. .mdebug.abi64 : {
  46. KEEP(*(.mdebug.abi64))
  47. }
  48. /* This is the MIPS specific mdebug section. */
  49. .mdebug : { *(.mdebug) }
  50. /* Stabs debugging sections. */
  51. .stab 0 : { *(.stab) }
  52. .stabstr 0 : { *(.stabstr) }
  53. .stab.excl 0 : { *(.stab.excl) }
  54. .stab.exclstr 0 : { *(.stab.exclstr) }
  55. .stab.index 0 : { *(.stab.index) }
  56. .stab.indexstr 0 : { *(.stab.indexstr) }
  57. .comment 0 : { *(.comment) }
  58. /*
  59. * DWARF debug sections.
  60. * Symbols in the DWARF debugging sections are relative to
  61. * the beginning of the section so we begin them at 0.
  62. */
  63. /* DWARF 1 */
  64. .debug 0 : { *(.debug) }
  65. .line 0 : { *(.line) }
  66. /* GNU DWARF 1 extensions */
  67. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  68. .debug_sfnames 0 : { *(.debug_sfnames) }
  69. /* DWARF 1.1 and DWARF 2 */
  70. .debug_aranges 0 : { *(.debug_aranges) }
  71. .debug_pubnames 0 : { *(.debug_pubnames) }
  72. /* DWARF 2 */
  73. .debug_info 0 : {
  74. *(.debug_info
  75. .gnu.linkonce.wi.*)
  76. }
  77. .debug_abbrev 0 : { *(.debug_abbrev) }
  78. .debug_line 0 : { *(.debug_line) }
  79. .debug_frame 0 : { *(.debug_frame) }
  80. .debug_str 0 : { *(.debug_str) }
  81. .debug_loc 0 : { *(.debug_loc) }
  82. .debug_macinfo 0 : { *(.debug_macinfo) }
  83. .debug_pubtypes 0 : { *(.debug_pubtypes) }
  84. /* DWARF 3 */
  85. .debug_ranges 0 : { *(.debug_ranges) }
  86. /* SGI/MIPS DWARF 2 extensions */
  87. .debug_weaknames 0 : { *(.debug_weaknames) }
  88. .debug_funcnames 0 : { *(.debug_funcnames) }
  89. .debug_typenames 0 : { *(.debug_typenames) }
  90. .debug_varnames 0 : { *(.debug_varnames) }
  91. /* GNU DWARF 2 extensions */
  92. .debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) }
  93. .debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) }
  94. /* DWARF 4 */
  95. .debug_types 0 : { *(.debug_types) }
  96. /* DWARF 5 */
  97. .debug_macro 0 : { *(.debug_macro) }
  98. .debug_addr 0 : { *(.debug_addr) }
  99. /DISCARD/ : {
  100. /* ABI crap starts here */
  101. *(.MIPS.abiflags)
  102. *(.MIPS.options)
  103. *(.options)
  104. *(.pdr)
  105. *(.reginfo)
  106. *(.eh_frame)
  107. }
  108. }