u-boot.lds 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /*
  2. * Copyrigth (c) 2007
  3. * Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
  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_FORMAT("elf32-sh-linux", "elf32-sh-linux", "elf32-sh-linux")
  24. OUTPUT_ARCH(sh)
  25. ENTRY(_start)
  26. SECTIONS
  27. {
  28. /*
  29. Base address of internal SDRAM is 0x0C000000.
  30. Although size of SDRAM can be either 16 or 32 MBytes,
  31. we assume 16 MBytes (ie ignore upper half if the full
  32. 32 MBytes is present).
  33. NOTE: This address must match with the definition of
  34. TEXT_BASE in config.mk (in this directory).
  35. */
  36. . = 0x8C000000 + (64*1024*1024) - (256*1024);
  37. PROVIDE (reloc_dst = .);
  38. PROVIDE (_ftext = .);
  39. PROVIDE (_fcode = .);
  40. PROVIDE (_start = .);
  41. .text :
  42. {
  43. cpu/sh4/start.o (.text)
  44. . = ALIGN(8192);
  45. common/env_embedded.o (.ppcenv)
  46. . = ALIGN(8192);
  47. common/env_embedded.o (.ppcenvr)
  48. . = ALIGN(8192);
  49. *(.text)
  50. . = ALIGN(4);
  51. } =0xFF
  52. PROVIDE (_ecode = .);
  53. .rodata :
  54. {
  55. *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
  56. . = ALIGN(4);
  57. }
  58. PROVIDE (_etext = .);
  59. PROVIDE (_fdata = .);
  60. .data :
  61. {
  62. *(.data)
  63. . = ALIGN(4);
  64. }
  65. PROVIDE (_edata = .);
  66. PROVIDE (_fgot = .);
  67. .got :
  68. {
  69. *(.got)
  70. . = ALIGN(4);
  71. }
  72. PROVIDE (_egot = .);
  73. PROVIDE (__u_boot_cmd_start = .);
  74. .u_boot_cmd :
  75. {
  76. *(.u_boot_cmd)
  77. . = ALIGN(4);
  78. }
  79. PROVIDE (__u_boot_cmd_end = .);
  80. PROVIDE (reloc_dst_end = .);
  81. /* _reloc_dst_end = .; */
  82. PROVIDE (bss_start = .);
  83. PROVIDE (__bss_start = .);
  84. .bss (NOLOAD) :
  85. {
  86. *(.bss)
  87. . = ALIGN(4);
  88. }
  89. PROVIDE (bss_end = .);
  90. PROVIDE (_end = .);
  91. }