u-boot.lds 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. /*
  2. * (C) Copyright 2002
  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. *(.text)
  66. *(.fixup)
  67. *(.got1)
  68. }
  69. _etext = .;
  70. PROVIDE (etext = .);
  71. .rodata :
  72. {
  73. *(.rodata)
  74. *(.rodata1)
  75. *(.rodata.str1.4)
  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. }
  127. ppcenv_assert = ASSERT(. < 0xFFFF8000, ".bss section too big, overlaps .ppcenv section. Please update your confguration: CFG_MONITOR_BASE, CFG_MONITOR_LEN and TEXT_BASE may need to be modified.");
  128. _end = . ;
  129. PROVIDE (end = .);
  130. }