u-boot-spl.lds 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. * Copyright (c) 2004-2008 Texas Instruments
  3. *
  4. * (C) Copyright 2002
  5. * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
  6. *
  7. * SPDX-License-Identifier: GPL-2.0+
  8. */
  9. OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
  10. OUTPUT_ARCH(arm)
  11. ENTRY(_start)
  12. SECTIONS
  13. {
  14. . = 0x00000000;
  15. . = ALIGN(4);
  16. .text :
  17. {
  18. __image_copy_start = .;
  19. *(.vectors)
  20. CPUDIR/start.o (.text*)
  21. *(.text*)
  22. }
  23. . = ALIGN(4);
  24. .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
  25. . = ALIGN(4);
  26. .data : {
  27. *(.data*)
  28. }
  29. . = ALIGN(4);
  30. .u_boot_list : {
  31. KEEP(*(SORT(.u_boot_list*)));
  32. }
  33. . = ALIGN(4);
  34. __image_copy_end = .;
  35. .rel.dyn : {
  36. __rel_dyn_start = .;
  37. *(.rel*)
  38. __rel_dyn_end = .;
  39. }
  40. .end :
  41. {
  42. *(.__end)
  43. }
  44. _image_binary_end = .;
  45. .bss __rel_dyn_start (OVERLAY) : {
  46. __bss_start = .;
  47. *(.bss*)
  48. . = ALIGN(4);
  49. __bss_end = .;
  50. }
  51. __bss_size = __bss_end - __bss_start;
  52. .dynsym _image_binary_end : { *(.dynsym) }
  53. .dynbss : { *(.dynbss) }
  54. .dynstr : { *(.dynstr*) }
  55. .dynamic : { *(.dynamic*) }
  56. .hash : { *(.hash*) }
  57. .plt : { *(.plt*) }
  58. .interp : { *(.interp*) }
  59. .gnu : { *(.gnu*) }
  60. .ARM.exidx : { *(.ARM.exidx*) }
  61. }
  62. #if defined(CONFIG_SPL_MAX_SIZE)
  63. ASSERT(__image_copy_end - __image_copy_start < (CONFIG_SPL_MAX_SIZE), \
  64. "SPL image too big");
  65. #endif
  66. #if defined(CONFIG_SPL_BSS_MAX_SIZE)
  67. ASSERT(__bss_end - __bss_start < (CONFIG_SPL_BSS_MAX_SIZE), \
  68. "SPL image BSS too big");
  69. #endif
  70. #if defined(CONFIG_SPL_MAX_FOOTPRINT)
  71. ASSERT(__bss_end - _start < (CONFIG_SPL_MAX_FOOTPRINT), \
  72. "SPL image plus BSS too big");
  73. #endif