u-boot.lds 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * (C) Copyright 2003
  4. * Wolfgang Denk Engineering, <wd@denx.de>
  5. */
  6. OUTPUT_ARCH(mips)
  7. ENTRY(_start)
  8. SECTIONS
  9. {
  10. . = 0x00000000;
  11. . = ALIGN(4);
  12. .text : {
  13. __text_start = .;
  14. *(.text*)
  15. __text_end = .;
  16. }
  17. . = ALIGN(4);
  18. .rodata : {
  19. *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
  20. }
  21. . = ALIGN(4);
  22. .data : {
  23. *(.data*)
  24. }
  25. . = ALIGN(4);
  26. .sdata : {
  27. *(.sdata*)
  28. }
  29. . = ALIGN(4);
  30. __u_boot_list : {
  31. KEEP(*(SORT(__u_boot_list*)));
  32. }
  33. . = ALIGN(4);
  34. __image_copy_end = .;
  35. __init_end = .;
  36. .data.reloc : {
  37. __rel_start = .;
  38. /*
  39. * Space for relocation table
  40. * This needs to be filled so that the
  41. * mips-reloc tool can overwrite the content.
  42. * An invalid value is left at the start of the
  43. * section to abort relocation if the table
  44. * has not been filled in.
  45. */
  46. LONG(0xFFFFFFFF);
  47. FILL(0);
  48. . += CONFIG_MIPS_RELOCATION_TABLE_SIZE - 4;
  49. }
  50. . = ALIGN(4);
  51. _end = .;
  52. .bss __rel_start (OVERLAY) : {
  53. __bss_start = .;
  54. *(.sbss.*)
  55. *(.bss.*)
  56. *(COMMON)
  57. . = ALIGN(4);
  58. __bss_end = .;
  59. }
  60. /* These mark the ABI of U-Boot for debuggers. */
  61. .mdebug.abi32 : {
  62. KEEP(*(.mdebug.abi32))
  63. }
  64. .mdebug.abi64 : {
  65. KEEP(*(.mdebug.abi64))
  66. }
  67. /* This is the MIPS specific mdebug section. */
  68. .mdebug : { *(.mdebug) }
  69. /* Stabs debugging sections. */
  70. .stab 0 : { *(.stab) }
  71. .stabstr 0 : { *(.stabstr) }
  72. .stab.excl 0 : { *(.stab.excl) }
  73. .stab.exclstr 0 : { *(.stab.exclstr) }
  74. .stab.index 0 : { *(.stab.index) }
  75. .stab.indexstr 0 : { *(.stab.indexstr) }
  76. .comment 0 : { *(.comment) }
  77. /*
  78. * DWARF debug sections.
  79. * Symbols in the DWARF debugging sections are relative to
  80. * the beginning of the section so we begin them at 0.
  81. */
  82. /* DWARF 1 */
  83. .debug 0 : { *(.debug) }
  84. .line 0 : { *(.line) }
  85. /* GNU DWARF 1 extensions */
  86. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  87. .debug_sfnames 0 : { *(.debug_sfnames) }
  88. /* DWARF 1.1 and DWARF 2 */
  89. .debug_aranges 0 : { *(.debug_aranges) }
  90. .debug_pubnames 0 : { *(.debug_pubnames) }
  91. /* DWARF 2 */
  92. .debug_info 0 : {
  93. *(.debug_info
  94. .gnu.linkonce.wi.*)
  95. }
  96. .debug_abbrev 0 : { *(.debug_abbrev) }
  97. .debug_line 0 : { *(.debug_line) }
  98. .debug_frame 0 : { *(.debug_frame) }
  99. .debug_str 0 : { *(.debug_str) }
  100. .debug_loc 0 : { *(.debug_loc) }
  101. .debug_macinfo 0 : { *(.debug_macinfo) }
  102. .debug_pubtypes 0 : { *(.debug_pubtypes) }
  103. /* DWARF 3 */
  104. .debug_ranges 0 : { *(.debug_ranges) }
  105. /* SGI/MIPS DWARF 2 extensions */
  106. .debug_weaknames 0 : { *(.debug_weaknames) }
  107. .debug_funcnames 0 : { *(.debug_funcnames) }
  108. .debug_typenames 0 : { *(.debug_typenames) }
  109. .debug_varnames 0 : { *(.debug_varnames) }
  110. /* GNU DWARF 2 extensions */
  111. .debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) }
  112. .debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) }
  113. /* DWARF 4 */
  114. .debug_types 0 : { *(.debug_types) }
  115. /* DWARF 5 */
  116. .debug_macro 0 : { *(.debug_macro) }
  117. .debug_addr 0 : { *(.debug_addr) }
  118. /DISCARD/ : {
  119. /* ABI crap starts here */
  120. *(.MIPS.abiflags)
  121. *(.MIPS.options)
  122. *(.options)
  123. *(.pdr)
  124. *(.reginfo)
  125. *(.eh_frame)
  126. }
  127. }