u-boot.lds 2.0 KB

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