u-boot.lds 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. /*
  2. * (C) Copyright 2004
  3. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  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_ARCH(powerpc)
  24. /* Do we need any of these for elf?
  25. __DYNAMIC = 0; */
  26. SECTIONS
  27. {
  28. .resetvec 0xFFFFFFFC :
  29. {
  30. *(.resetvec)
  31. } = 0xffff
  32. .bootpg 0xFFFFF000 :
  33. {
  34. cpu/ppc4xx/start.o (.bootpg)
  35. } = 0xffff
  36. /* Read-only sections, merged into text segment: */
  37. . = + SIZEOF_HEADERS;
  38. .interp : { *(.interp) }
  39. .hash : { *(.hash) }
  40. .dynsym : { *(.dynsym) }
  41. .dynstr : { *(.dynstr) }
  42. .rel.text : { *(.rel.text) }
  43. .rela.text : { *(.rela.text) }
  44. .rel.data : { *(.rel.data) }
  45. .rela.data : { *(.rela.data) }
  46. .rel.rodata : { *(.rel.rodata) }
  47. .rela.rodata : { *(.rela.rodata) }
  48. .rel.got : { *(.rel.got) }
  49. .rela.got : { *(.rela.got) }
  50. .rel.ctors : { *(.rel.ctors) }
  51. .rela.ctors : { *(.rela.ctors) }
  52. .rel.dtors : { *(.rel.dtors) }
  53. .rela.dtors : { *(.rela.dtors) }
  54. .rel.bss : { *(.rel.bss) }
  55. .rela.bss : { *(.rela.bss) }
  56. .rel.plt : { *(.rel.plt) }
  57. .rela.plt : { *(.rela.plt) }
  58. .init : { *(.init) }
  59. .plt : { *(.plt) }
  60. .text :
  61. {
  62. /* WARNING - the following is hand-optimized to fit within */
  63. /* the sector layout of our flash chips! XXX FIXME XXX */
  64. cpu/ppc4xx/start.o (.text)
  65. board/amcc/taishan/init.o (.text)
  66. *(.text)
  67. *(.fixup)
  68. *(.got1)
  69. }
  70. _etext = .;
  71. PROVIDE (etext = .);
  72. .rodata :
  73. {
  74. *(.rodata)
  75. *(.rodata1)
  76. *(.rodata.str1.4)
  77. *(.eh_frame)
  78. }
  79. .fini : { *(.fini) } =0
  80. .ctors : { *(.ctors) }
  81. .dtors : { *(.dtors) }
  82. /* Read-write section, merged into data segment: */
  83. . = (. + 0x00FF) & 0xFFFFFF00;
  84. _erotext = .;
  85. PROVIDE (erotext = .);
  86. .reloc :
  87. {
  88. *(.got)
  89. _GOT2_TABLE_ = .;
  90. *(.got2)
  91. _FIXUP_TABLE_ = .;
  92. *(.fixup)
  93. }
  94. __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
  95. __fixup_entries = (. - _FIXUP_TABLE_)>>2;
  96. .data :
  97. {
  98. *(.data)
  99. *(.data1)
  100. *(.sdata)
  101. *(.sdata2)
  102. *(.dynamic)
  103. CONSTRUCTORS
  104. }
  105. _edata = .;
  106. PROVIDE (edata = .);
  107. . = .;
  108. __u_boot_cmd_start = .;
  109. .u_boot_cmd : { *(.u_boot_cmd) }
  110. __u_boot_cmd_end = .;
  111. . = .;
  112. __start___ex_table = .;
  113. __ex_table : { *(__ex_table) }
  114. __stop___ex_table = .;
  115. . = ALIGN(256);
  116. __init_begin = .;
  117. .text.init : { *(.text.init) }
  118. .data.init : { *(.data.init) }
  119. . = ALIGN(256);
  120. __init_end = .;
  121. __bss_start = .;
  122. .bss (NOLOAD) :
  123. {
  124. *(.sbss) *(.scommon)
  125. *(.dynbss)
  126. *(.bss)
  127. *(COMMON)
  128. }
  129. _end = . ;
  130. PROVIDE (end = .);
  131. }