u-boot.lds 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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. /* Do we need any of these for elf?
  27. __DYNAMIC = 0; */
  28. SECTIONS
  29. {
  30. /* Read-only sections, merged into text segment: */
  31. .interp : { *(.interp) }
  32. .hash : { *(.hash) }
  33. .dynsym : { *(.dynsym) }
  34. .dynstr : { *(.dynstr) }
  35. .rel.text : { *(.rel.text) }
  36. .rela.text : { *(.rela.text) }
  37. .rel.data : { *(.rel.data) }
  38. .rela.data : { *(.rela.data) }
  39. .rel.rodata : { *(.rel.rodata) }
  40. .rela.rodata : { *(.rela.rodata) }
  41. .rel.got : { *(.rel.got) }
  42. .rela.got : { *(.rela.got) }
  43. .rel.ctors : { *(.rel.ctors) }
  44. .rela.ctors : { *(.rela.ctors) }
  45. .rel.dtors : { *(.rel.dtors) }
  46. .rela.dtors : { *(.rela.dtors) }
  47. .rel.bss : { *(.rel.bss) }
  48. .rela.bss : { *(.rela.bss) }
  49. .rel.plt : { *(.rel.plt) }
  50. .rela.plt : { *(.rela.plt) }
  51. .init : { *(.init) }
  52. .plt : { *(.plt) }
  53. .text :
  54. {
  55. cpu/mpc85xx/start.o (.text)
  56. cpu/mpc85xx/traps.o (.text)
  57. cpu/mpc85xx/interrupts.o (.text)
  58. cpu/mpc85xx/cpu_init.o (.text)
  59. cpu/mpc85xx/cpu.o (.text)
  60. cpu/mpc85xx/speed.o (.text)
  61. cpu/mpc85xx/pci.o (.text)
  62. common/dlmalloc.o (.text)
  63. lib_generic/crc32.o (.text)
  64. lib_ppc/extable.o (.text)
  65. lib_generic/zlib.o (.text)
  66. *(.text)
  67. *(.fixup)
  68. *(.got1)
  69. }
  70. _etext = .;
  71. PROVIDE (etext = .);
  72. .rodata :
  73. {
  74. *(.eh_frame)
  75. *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
  76. }
  77. .fini : { *(.fini) } =0
  78. .ctors : { *(.ctors) }
  79. .dtors : { *(.dtors) }
  80. /* Read-write section, merged into data segment: */
  81. . = (. + 0x00FF) & 0xFFFFFF00;
  82. _erotext = .;
  83. PROVIDE (erotext = .);
  84. .reloc :
  85. {
  86. *(.got)
  87. _GOT2_TABLE_ = .;
  88. *(.got2)
  89. _FIXUP_TABLE_ = .;
  90. *(.fixup)
  91. }
  92. __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
  93. __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
  94. .data :
  95. {
  96. *(.data)
  97. *(.data1)
  98. *(.sdata)
  99. *(.sdata2)
  100. *(.dynamic)
  101. CONSTRUCTORS
  102. }
  103. _edata = .;
  104. PROVIDE (edata = .);
  105. . = .;
  106. __u_boot_cmd_start = .;
  107. .u_boot_cmd : { *(.u_boot_cmd) }
  108. __u_boot_cmd_end = .;
  109. . = .;
  110. __start___ex_table = .;
  111. __ex_table : { *(__ex_table) }
  112. __stop___ex_table = .;
  113. . = ALIGN(256);
  114. __init_begin = .;
  115. .text.init : { *(.text.init) }
  116. .data.init : { *(.data.init) }
  117. . = ALIGN(256);
  118. __init_end = .;
  119. __bss_start = .;
  120. .bss (NOLOAD) :
  121. {
  122. *(.sbss) *(.scommon)
  123. *(.dynbss)
  124. *(.bss)
  125. *(COMMON)
  126. . = ALIGN(4);
  127. }
  128. _end = . ;
  129. PROVIDE (end = .);
  130. . = (. & 0xFFF80000) + 0x0007F000;
  131. .bootpg :
  132. {
  133. cpu/mpc85xx/start.o (.bootpg)
  134. } = 0xffff
  135. . = (. & 0xFFF80000) + 0x0007FFFC;
  136. .resetvec :
  137. {
  138. *(.resetvec)
  139. } = 0xffff
  140. }