u-boot.lds 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2016 Vladimir Zapolskiy <vz@mleia.com>
  4. * Copyright (C) 2008-2009 Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
  5. * Copyright (C) 2008 Mark Jonas <mark.jonas@de.bosch.com>
  6. * Copyright (C) 2007 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
  7. */
  8. #include "config.h"
  9. #ifdef CONFIG_SYS_BIG_ENDIAN
  10. OUTPUT_FORMAT("elf32-shbig-linux", "elf32-shbig-linux", "elf32-sh-linux")
  11. #else
  12. OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", "elf32-sh-linux")
  13. #endif
  14. OUTPUT_ARCH(sh)
  15. MEMORY
  16. {
  17. ram : ORIGIN = CONFIG_SYS_SDRAM_BASE, LENGTH = CONFIG_SYS_SDRAM_SIZE
  18. }
  19. ENTRY(_start)
  20. SECTIONS
  21. {
  22. reloc_dst = .;
  23. PROVIDE (_ftext = .);
  24. PROVIDE (_fcode = .);
  25. PROVIDE (_start = .);
  26. .text :
  27. {
  28. KEEP(*/start.o (.text))
  29. KEEP(CONFIG_BOARDDIR/lowlevel_init.o (.text .spiboot1.text))
  30. KEEP(*(.spiboot2.text))
  31. . = ALIGN(8192);
  32. #ifdef CONFIG_ENV_IS_IN_FLASH
  33. env/embedded.o (.doesnotexist)
  34. . = ALIGN(8192);
  35. #endif
  36. *(.text)
  37. . = ALIGN(4);
  38. } >ram =0xFF
  39. PROVIDE (_ecode = .);
  40. .rodata :
  41. {
  42. *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
  43. . = ALIGN(4);
  44. } >ram
  45. PROVIDE (_etext = .);
  46. PROVIDE (_fdata = .);
  47. .data :
  48. {
  49. *(.data)
  50. . = ALIGN(4);
  51. } >ram
  52. PROVIDE (_edata = .);
  53. PROVIDE (_fgot = .);
  54. .got :
  55. {
  56. *(.got.plt) *(.got)
  57. . = ALIGN(4);
  58. } >ram
  59. PROVIDE (_egot = .);
  60. .u_boot_list : {
  61. KEEP(*(SORT(.u_boot_list*)));
  62. } >ram
  63. PROVIDE (__init_end = .);
  64. PROVIDE (reloc_dst_end = .);
  65. PROVIDE (bss_start = .);
  66. PROVIDE (__bss_start = .);
  67. .bss :
  68. {
  69. *(.bss)
  70. . = ALIGN(4);
  71. } >ram
  72. PROVIDE (bss_end = .);
  73. PROVIDE (__bss_end = .);
  74. }