u-boot.lds 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. /*
  2. * (C) Copyright 2004, Psyent Corporation <www.psyent.com>
  3. * Scott McNutt <smcnutt@psyent.com>
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. OUTPUT_FORMAT("elf32-littlenios2")
  24. OUTPUT_ARCH(nios2)
  25. ENTRY(_start)
  26. SECTIONS
  27. {
  28. .text :
  29. {
  30. arch/nios2/cpu/start.o (.text)
  31. *(.text)
  32. *(.text.*)
  33. *(.gnu.linkonce.t*)
  34. *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
  35. *(.gnu.linkonce.r*)
  36. }
  37. . = ALIGN (4);
  38. _etext = .;
  39. PROVIDE (etext = .);
  40. /* CMD TABLE - sandwich this in between text and data so
  41. * the initialization code relocates the command table as
  42. * well -- admittedly, this is just pure laziness ;-)
  43. */
  44. __u_boot_cmd_start = .;
  45. .u_boot_cmd :
  46. {
  47. *(.u_boot_cmd)
  48. }
  49. . = ALIGN(4);
  50. __u_boot_cmd_end = .;
  51. /* INIT DATA sections - "Small" data (see the gcc -G option)
  52. * is always gp-relative. Here we make all init data sections
  53. * adjacent to simplify the startup code -- and provide
  54. * the global pointer for gp-relative access.
  55. */
  56. _data = .;
  57. .data :
  58. {
  59. *(.data)
  60. *(.data.*)
  61. *(.gnu.linkonce.d*)
  62. }
  63. . = ALIGN(16);
  64. _gp = .; /* Global pointer addr */
  65. PROVIDE (gp = .);
  66. .sdata :
  67. {
  68. *(.sdata)
  69. *(.sdata.*)
  70. *(.gnu.linkonce.s.*)
  71. }
  72. . = ALIGN(4);
  73. _edata = .;
  74. PROVIDE (edata = .);
  75. /* UNINIT DATA - Small uninitialized data is first so it's
  76. * adjacent to sdata and can be referenced via gp. The normal
  77. * bss follows. We keep it adjacent to simplify init code.
  78. */
  79. __bss_start = .;
  80. .sbss (NOLOAD) :
  81. {
  82. *(.sbss)
  83. *(.sbss.*)
  84. *(.gnu.linkonce.sb.*)
  85. *(.scommon)
  86. }
  87. . = ALIGN(4);
  88. .bss (NOLOAD) :
  89. {
  90. *(.bss)
  91. *(.bss.*)
  92. *(.dynbss)
  93. *(COMMON)
  94. *(.scommon)
  95. }
  96. . = ALIGN(4);
  97. _end = .;
  98. PROVIDE (end = .);
  99. /* DEBUG -- symbol table, string table, etc. etc.
  100. */
  101. .stab 0 : { *(.stab) }
  102. .stabstr 0 : { *(.stabstr) }
  103. .stab.excl 0 : { *(.stab.excl) }
  104. .stab.exclstr 0 : { *(.stab.exclstr) }
  105. .stab.index 0 : { *(.stab.index) }
  106. .stab.indexstr 0 : { *(.stab.indexstr) }
  107. .comment 0 : { *(.comment) }
  108. .debug 0 : { *(.debug) }
  109. .line 0 : { *(.line) }
  110. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  111. .debug_sfnames 0 : { *(.debug_sfnames) }
  112. .debug_aranges 0 : { *(.debug_aranges) }
  113. .debug_pubnames 0 : { *(.debug_pubnames) }
  114. .debug_info 0 : { *(.debug_info) }
  115. .debug_abbrev 0 : { *(.debug_abbrev) }
  116. .debug_line 0 : { *(.debug_line) }
  117. .debug_frame 0 : { *(.debug_frame) }
  118. .debug_str 0 : { *(.debug_str) }
  119. .debug_loc 0 : { *(.debug_loc) }
  120. .debug_macinfo 0 : { *(.debug_macinfo) }
  121. .debug_weaknames 0 : { *(.debug_weaknames) }
  122. .debug_funcnames 0 : { *(.debug_funcnames) }
  123. .debug_typenames 0 : { *(.debug_typenames) }
  124. .debug_varnames 0 : { *(.debug_varnames) }
  125. }