u-boot.lds 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. /*
  2. **=====================================================================
  3. **
  4. ** Copyright (C) 2000, 2001, 2002, 2003
  5. ** The LEOX team <team@leox.org>, http://www.leox.org
  6. **
  7. ** LEOX.org is about the development of free hardware and software resources
  8. ** for system on chip.
  9. **
  10. ** Description: U-Boot port on the LEOX's ELPT860 CPU board
  11. ** ~~~~~~~~~~~
  12. **
  13. **=====================================================================
  14. **
  15. ** This program is free software; you can redistribute it and/or
  16. ** modify it under the terms of the GNU General Public License as
  17. ** published by the Free Software Foundation; either version 2 of
  18. ** the License, or (at your option) any later version.
  19. **
  20. ** This program is distributed in the hope that it will be useful,
  21. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  22. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  23. ** GNU General Public License for more details.
  24. **
  25. ** You should have received a copy of the GNU General Public License
  26. ** along with this program; if not, write to the Free Software
  27. ** Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  28. ** MA 02111-1307 USA
  29. **
  30. **=====================================================================
  31. */
  32. OUTPUT_ARCH(powerpc)
  33. /* Do we need any of these for elf?
  34. __DYNAMIC = 0; */
  35. SECTIONS
  36. {
  37. /* Read-only sections, merged into text segment: */
  38. . = + SIZEOF_HEADERS;
  39. .interp : { *(.interp) }
  40. .hash : { *(.hash) }
  41. .dynsym : { *(.dynsym) }
  42. .dynstr : { *(.dynstr) }
  43. .rel.text : { *(.rel.text) }
  44. .rela.text : { *(.rela.text) }
  45. .rel.data : { *(.rel.data) }
  46. .rela.data : { *(.rela.data) }
  47. .rel.rodata : { *(.rel.rodata) }
  48. .rela.rodata : { *(.rela.rodata) }
  49. .rel.got : { *(.rel.got) }
  50. .rela.got : { *(.rela.got) }
  51. .rel.ctors : { *(.rel.ctors) }
  52. .rela.ctors : { *(.rela.ctors) }
  53. .rel.dtors : { *(.rel.dtors) }
  54. .rela.dtors : { *(.rela.dtors) }
  55. .rel.bss : { *(.rel.bss) }
  56. .rela.bss : { *(.rela.bss) }
  57. .rel.plt : { *(.rel.plt) }
  58. .rela.plt : { *(.rela.plt) }
  59. .init : { *(.init) }
  60. .plt : { *(.plt) }
  61. .text :
  62. {
  63. /* WARNING - the following is hand-optimized to fit within */
  64. /* the sector layout of our flash chips! XXX FIXME XXX */
  65. cpu/mpc8xx/start.o (.text)
  66. common/dlmalloc.o (.text)
  67. arch/ppc/lib/ppcstring.o (.text)
  68. lib/vsprintf.o (.text)
  69. lib/crc32.o (.text)
  70. lib/zlib.o (.text)
  71. lib/string.o (.text)
  72. arch/ppc/lib/cache.o (.text)
  73. arch/ppc/lib/extable.o (.text)
  74. arch/ppc/lib/time.o (.text)
  75. arch/ppc/lib/ticks.o (.text)
  76. . = env_offset;
  77. common/env_embedded.o (.text)
  78. *(.text)
  79. *(.got1)
  80. }
  81. _etext = .;
  82. PROVIDE (etext = .);
  83. .rodata :
  84. {
  85. *(.eh_frame)
  86. *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
  87. }
  88. .fini : { *(.fini) } =0
  89. .ctors : { *(.ctors) }
  90. .dtors : { *(.dtors) }
  91. /* Read-write section, merged into data segment: */
  92. . = (. + 0x00FF) & 0xFFFFFF00;
  93. _erotext = .;
  94. PROVIDE (erotext = .);
  95. .reloc :
  96. {
  97. *(.got)
  98. _GOT2_TABLE_ = .;
  99. *(.got2)
  100. _FIXUP_TABLE_ = .;
  101. *(.fixup)
  102. }
  103. __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
  104. __fixup_entries = (. - _FIXUP_TABLE_)>>2;
  105. .data :
  106. {
  107. *(.data)
  108. *(.data1)
  109. *(.sdata)
  110. *(.sdata2)
  111. *(.dynamic)
  112. CONSTRUCTORS
  113. }
  114. _edata = .;
  115. PROVIDE (edata = .);
  116. . = .;
  117. __u_boot_cmd_start = .;
  118. .u_boot_cmd : { *(.u_boot_cmd) }
  119. __u_boot_cmd_end = .;
  120. . = .;
  121. __start___ex_table = .;
  122. __ex_table : { *(__ex_table) }
  123. __stop___ex_table = .;
  124. . = ALIGN(256);
  125. __init_begin = .;
  126. .text.init : { *(.text.init) }
  127. .data.init : { *(.data.init) }
  128. . = ALIGN(256);
  129. __init_end = .;
  130. __bss_start = .;
  131. .bss (NOLOAD) :
  132. {
  133. *(.sbss) *(.scommon)
  134. *(.dynbss)
  135. *(.bss)
  136. *(COMMON)
  137. . = ALIGN(4);
  138. }
  139. _end = . ;
  140. PROVIDE (end = .);
  141. }