u-boot.lds 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /*
  2. * Copyrigth (c) 2007
  3. * Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
  4. * Copyrigth (c) 2008-2009 Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
  5. *
  6. * See file CREDITS for list of people who contributed to this
  7. * project.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of
  12. * the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  22. * MA 02111-1307 USA
  23. */
  24. OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", "elf32-sh-linux")
  25. OUTPUT_ARCH(sh)
  26. ENTRY(_start)
  27. SECTIONS
  28. {
  29. /*
  30. * entry and reloct_dst will be provided via ldflags
  31. */
  32. . = .;
  33. PROVIDE (_ftext = .);
  34. PROVIDE (_fcode = .);
  35. PROVIDE (_start = .);
  36. .text :
  37. {
  38. cpu/sh4/start.o (.text)
  39. . = ALIGN(8192);
  40. common/env_embedded.o (.ppcenv)
  41. . = ALIGN(8192);
  42. common/env_embedded.o (.ppcenvr)
  43. . = ALIGN(8192);
  44. *(.text)
  45. . = ALIGN(4);
  46. } =0xFF
  47. PROVIDE (_ecode = .);
  48. .rodata :
  49. {
  50. *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
  51. . = ALIGN(4);
  52. }
  53. PROVIDE (_etext = .);
  54. PROVIDE (_fdata = .);
  55. .data :
  56. {
  57. *(.data)
  58. . = ALIGN(4);
  59. }
  60. PROVIDE (_edata = .);
  61. PROVIDE (_fgot = .);
  62. .got :
  63. {
  64. *(.got)
  65. . = ALIGN(4);
  66. }
  67. PROVIDE (_egot = .);
  68. PROVIDE (__u_boot_cmd_start = .);
  69. .u_boot_cmd :
  70. {
  71. *(.u_boot_cmd)
  72. . = ALIGN(4);
  73. }
  74. PROVIDE (__u_boot_cmd_end = .);
  75. PROVIDE (reloc_dst_end = .);
  76. /* _reloc_dst_end = .; */
  77. PROVIDE (bss_start = .);
  78. PROVIDE (__bss_start = .);
  79. .bss :
  80. {
  81. *(.bss)
  82. . = ALIGN(4);
  83. }
  84. PROVIDE (bss_end = .);
  85. PROVIDE (_end = .);
  86. }