u-boot.lds 3.5 KB

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