u-boot.lds 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /*
  2. * Copyright (C) 2007
  3. * Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
  4. *
  5. * Copyright (C) 2012
  6. * Yoshihiro Shimoda <yoshihiro.shimoda.uh@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. KEEP(arch/sh/cpu/sh4/start.o (.text))
  41. *(.spiboot1.text)
  42. *(.spiboot2.text)
  43. . = ALIGN(8192);
  44. common/env_embedded.o (.ppcenv)
  45. . = ALIGN(8192);
  46. common/env_embedded.o (.ppcenvr)
  47. . = ALIGN(8192);
  48. *(.text)
  49. . = ALIGN(4);
  50. } =0xFF
  51. PROVIDE (_ecode = .);
  52. .rodata :
  53. {
  54. *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
  55. . = ALIGN(4);
  56. }
  57. PROVIDE (_etext = .);
  58. PROVIDE (_fdata = .);
  59. .data :
  60. {
  61. *(.data)
  62. . = ALIGN(4);
  63. }
  64. PROVIDE (_edata = .);
  65. PROVIDE (_fgot = .);
  66. .got :
  67. {
  68. *(.got)
  69. . = ALIGN(4);
  70. }
  71. PROVIDE (_egot = .);
  72. .u_boot_list : {
  73. #include <u-boot.lst>
  74. }
  75. PROVIDE (reloc_dst_end = .);
  76. /* _reloc_dst_end = .; */
  77. PROVIDE (bss_start = .);
  78. PROVIDE (__bss_start = .);
  79. .bss (NOLOAD) :
  80. {
  81. *(.bss)
  82. . = ALIGN(4);
  83. }
  84. PROVIDE (bss_end = .);
  85. PROVIDE (__bss_end__ = .);
  86. }