u-boot.lds 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. /*
  2. * (C) Copyright 2001
  3. * Josh Huber <huber@mclx.com>, Mission Critical Linux, Inc.
  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. /*
  24. * u-boot.lds - linker script for U-Boot on the Galileo Eval Board.
  25. */
  26. OUTPUT_ARCH(powerpc)
  27. SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/local/powerpc-any-elf/lib);
  28. /* Do we need any of these for elf?
  29. __DYNAMIC = 0; */
  30. SECTIONS
  31. {
  32. /* Read-only sections, merged into text segment: */
  33. . = + SIZEOF_HEADERS;
  34. .interp : { *(.interp) }
  35. .hash : { *(.hash) }
  36. .dynsym : { *(.dynsym) }
  37. .dynstr : { *(.dynstr) }
  38. .rel.text : { *(.rel.text) }
  39. .rela.text : { *(.rela.text) }
  40. .rel.data : { *(.rel.data) }
  41. .rela.data : { *(.rela.data) }
  42. .rel.rodata : { *(.rel.rodata) }
  43. .rela.rodata : { *(.rela.rodata) }
  44. .rel.got : { *(.rel.got) }
  45. .rela.got : { *(.rela.got) }
  46. .rel.ctors : { *(.rel.ctors) }
  47. .rela.ctors : { *(.rela.ctors) }
  48. .rel.dtors : { *(.rel.dtors) }
  49. .rela.dtors : { *(.rela.dtors) }
  50. .rel.bss : { *(.rel.bss) }
  51. .rela.bss : { *(.rela.bss) }
  52. .rel.plt : { *(.rel.plt) }
  53. .rela.plt : { *(.rela.plt) }
  54. .init : { *(.init) }
  55. .plt : { *(.plt) }
  56. .text :
  57. {
  58. cpu/74xx_7xx/start.o (.text)
  59. /* store the environment in a seperate sector in the boot flash */
  60. /* . = env_offset; */
  61. /* common/environment.o(.text) */
  62. *(.text)
  63. *(.fixup)
  64. *(.got1)
  65. }
  66. _etext = .;
  67. PROVIDE (etext = .);
  68. .rodata :
  69. {
  70. *(.rodata)
  71. *(.rodata1)
  72. }
  73. .fini : { *(.fini) } =0
  74. .ctors : { *(.ctors) }
  75. .dtors : { *(.dtors) }
  76. /* Read-write section, merged into data segment: */
  77. . = (. + 0x00FF) & 0xFFFFFF00;
  78. _erotext = .;
  79. PROVIDE (erotext = .);
  80. .reloc :
  81. {
  82. *(.got)
  83. _GOT2_TABLE_ = .;
  84. *(.got2)
  85. _FIXUP_TABLE_ = .;
  86. *(.fixup)
  87. }
  88. __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
  89. __fixup_entries = (. - _FIXUP_TABLE_)>>2;
  90. .data :
  91. {
  92. *(.data)
  93. *(.data1)
  94. *(.sdata)
  95. *(.sdata2)
  96. *(.dynamic)
  97. CONSTRUCTORS
  98. }
  99. _edata = .;
  100. PROVIDE (edata = .);
  101. __start___ex_table = .;
  102. __ex_table : { *(__ex_table) }
  103. __stop___ex_table = .;
  104. . = ALIGN(256);
  105. __init_begin = .;
  106. .text.init : { *(.text.init) }
  107. .data.init : { *(.data.init) }
  108. . = ALIGN(256);
  109. __init_end = .;
  110. __bss_start = .;
  111. .bss :
  112. {
  113. *(.sbss) *(.scommon)
  114. *(.dynbss)
  115. *(.bss)
  116. *(COMMON)
  117. }
  118. _end = . ;
  119. PROVIDE (end = .);
  120. }