u-boot-spl.lds 1.7 KB

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