u-boot-spl.lds 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2015 Atmel Corporation
  4. * Bo Shen <voice.shen@atmel.com>
  5. */
  6. MEMORY { .sram : ORIGIN = CONFIG_SPL_TEXT_BASE, \
  7. LENGTH = CONFIG_SPL_MAX_SIZE }
  8. MEMORY { .sdram : ORIGIN = CONFIG_SPL_BSS_START_ADDR, \
  9. LENGTH = CONFIG_SPL_BSS_MAX_SIZE }
  10. OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
  11. OUTPUT_ARCH(arm)
  12. ENTRY(_start)
  13. SECTIONS
  14. {
  15. .text :
  16. {
  17. __start = .;
  18. *(.vectors)
  19. arch/arm/cpu/arm926ejs/start.o (.text*)
  20. *(.text*)
  21. } >.sram
  22. . = ALIGN(4);
  23. .rodata : { *(SORT_BY_ALIGNMENT(.rodata*)) } >.sram
  24. . = ALIGN(4);
  25. .data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram
  26. . = ALIGN(4);
  27. .u_boot_list : { KEEP(*(SORT(.u_boot_list*))) } > .sram
  28. . = ALIGN(4);
  29. __image_copy_end = .;
  30. .end :
  31. {
  32. *(.__end)
  33. } >.sram
  34. .bss :
  35. {
  36. . = ALIGN(4);
  37. __bss_start = .;
  38. *(.bss*)
  39. . = ALIGN(4);
  40. __bss_end = .;
  41. } >.sdram
  42. }
  43. #if defined(CONFIG_SPL_MAX_SIZE)
  44. ASSERT(__image_copy_end - __image_copy_start < (CONFIG_SPL_MAX_SIZE), \
  45. "SPL image too big");
  46. #endif
  47. #if defined(CONFIG_SPL_BSS_MAX_SIZE)
  48. ASSERT(__bss_end - __bss_start < (CONFIG_SPL_BSS_MAX_SIZE), \
  49. "SPL image BSS too big");
  50. #endif