u-boot.lds 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. /*
  2. * (C) Copyright 2002,2003, Motorola,Inc.
  3. *
  4. * See file CREDITS for list of people who contributed to this
  5. * project.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  20. * MA 02111-1307 USA
  21. */
  22. /* Assumes that the size of u-boot is less than 512K and the
  23. * start address is aligned on a 512K block.
  24. * Boot page and reset vector is put at that end of the 512K block. */
  25. OUTPUT_ARCH(powerpc)
  26. SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/local/powerpc-any-elf/lib);
  27. /* Do we need any of these for elf?
  28. __DYNAMIC = 0; */
  29. SECTIONS
  30. {
  31. /* Read-only sections, merged into text segment: */
  32. .interp : { *(.interp) }
  33. .hash : { *(.hash) }
  34. .dynsym : { *(.dynsym) }
  35. .dynstr : { *(.dynstr) }
  36. .rel.text : { *(.rel.text) }
  37. .rela.text : { *(.rela.text) }
  38. .rel.data : { *(.rel.data) }
  39. .rela.data : { *(.rela.data) }
  40. .rel.rodata : { *(.rel.rodata) }
  41. .rela.rodata : { *(.rela.rodata) }
  42. .rel.got : { *(.rel.got) }
  43. .rela.got : { *(.rela.got) }
  44. .rel.ctors : { *(.rel.ctors) }
  45. .rela.ctors : { *(.rela.ctors) }
  46. .rel.dtors : { *(.rel.dtors) }
  47. .rela.dtors : { *(.rela.dtors) }
  48. .rel.bss : { *(.rel.bss) }
  49. .rela.bss : { *(.rela.bss) }
  50. .rel.plt : { *(.rel.plt) }
  51. .rela.plt : { *(.rela.plt) }
  52. .init : { *(.init) }
  53. .plt : { *(.plt) }
  54. .text :
  55. {
  56. cpu/mpc85xx/start.o (.text)
  57. board/mpc8540eval/init.o (.text)
  58. cpu/mpc85xx/traps.o (.text)
  59. cpu/mpc85xx/interrupts.o (.text)
  60. cpu/mpc85xx/cpu_init.o (.text)
  61. cpu/mpc85xx/cpu.o (.text)
  62. cpu/mpc85xx/speed.o (.text)
  63. cpu/mpc85xx/pci.o (.text)
  64. common/dlmalloc.o (.text)
  65. lib_generic/crc32.o (.text)
  66. lib_ppc/extable.o (.text)
  67. lib_generic/zlib.o (.text)
  68. *(.text)
  69. *(.fixup)
  70. *(.got1)
  71. }
  72. _etext = .;
  73. PROVIDE (etext = .);
  74. .rodata :
  75. {
  76. *(.rodata)
  77. *(.rodata1)
  78. *(.rodata.str1.4)
  79. *(.eh_frame)
  80. }
  81. .fini : { *(.fini) } =0
  82. .ctors : { *(.ctors) }
  83. .dtors : { *(.dtors) }
  84. /* Read-write section, merged into data segment: */
  85. . = (. + 0x00FF) & 0xFFFFFF00;
  86. _erotext = .;
  87. PROVIDE (erotext = .);
  88. .reloc :
  89. {
  90. *(.got)
  91. _GOT2_TABLE_ = .;
  92. *(.got2)
  93. _FIXUP_TABLE_ = .;
  94. *(.fixup)
  95. }
  96. __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
  97. __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
  98. .data :
  99. {
  100. *(.data)
  101. *(.data1)
  102. *(.sdata)
  103. *(.sdata2)
  104. *(.dynamic)
  105. CONSTRUCTORS
  106. }
  107. _edata = .;
  108. PROVIDE (edata = .);
  109. . = .;
  110. __u_boot_cmd_start = .;
  111. .u_boot_cmd : { *(.u_boot_cmd) }
  112. __u_boot_cmd_end = .;
  113. . = .;
  114. __start___ex_table = .;
  115. __ex_table : { *(__ex_table) }
  116. __stop___ex_table = .;
  117. . = ALIGN(256);
  118. __init_begin = .;
  119. .text.init : { *(.text.init) }
  120. .data.init : { *(.data.init) }
  121. . = ALIGN(256);
  122. __init_end = .;
  123. __bss_start = .;
  124. .bss :
  125. {
  126. *(.sbss) *(.scommon)
  127. *(.dynbss)
  128. *(.bss)
  129. *(COMMON)
  130. }
  131. _end = . ;
  132. PROVIDE (end = .);
  133. . = (. & 0xFFF80000) + 0x0007F000;
  134. .bootpg :
  135. {
  136. cpu/mpc85xx/start.o (.bootpg)
  137. board/mpc8540eval/init.o (.bootpg)
  138. } = 0xffff
  139. . = (. & 0xFFF80000) + 0x0007FFFC;
  140. .resetvec :
  141. {
  142. *(.resetvec)
  143. } = 0xffff
  144. }