u-boot.lds 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. . = CONFIG_SYS_TEXT_BASE;
  23. reloc_dst = .;
  24. PROVIDE (_ftext = .);
  25. PROVIDE (_fcode = .);
  26. PROVIDE (_start = .);
  27. .text :
  28. {
  29. KEEP(*/start.o (.text))
  30. KEEP(CONFIG_BOARDDIR/lowlevel_init.o (.text .spiboot1.text))
  31. KEEP(*(.spiboot2.text))
  32. . = ALIGN(8192);
  33. #ifdef CONFIG_ENV_IS_IN_FLASH
  34. env/embedded.o (.doesnotexist)
  35. . = ALIGN(8192);
  36. #endif
  37. *(.text)
  38. . = ALIGN(4);
  39. } >ram =0xFF
  40. PROVIDE (_ecode = .);
  41. .rodata :
  42. {
  43. *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
  44. . = ALIGN(4);
  45. } >ram
  46. PROVIDE (_etext = .);
  47. PROVIDE (_fdata = .);
  48. .data :
  49. {
  50. *(.data)
  51. . = ALIGN(4);
  52. } >ram
  53. PROVIDE (_edata = .);
  54. PROVIDE (_fgot = .);
  55. .got :
  56. {
  57. *(.got.plt) *(.got)
  58. . = ALIGN(4);
  59. } >ram
  60. PROVIDE (_egot = .);
  61. .u_boot_list : {
  62. KEEP(*(SORT(.u_boot_list*)));
  63. } >ram
  64. PROVIDE (__init_end = .);
  65. PROVIDE (reloc_dst_end = .);
  66. PROVIDE (_end = .);
  67. PROVIDE (bss_start = .);
  68. PROVIDE (__bss_start = .);
  69. .bss :
  70. {
  71. *(.bss)
  72. . = ALIGN(4);
  73. } >ram
  74. PROVIDE (bss_end = .);
  75. PROVIDE (__bss_end = .);
  76. }