u-boot-spl.lds 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. #ifdef CONFIG_SPL_DM
  31. .u_boot_list : {
  32. KEEP(*(SORT(.u_boot_list_*_driver_*)));
  33. KEEP(*(SORT(.u_boot_list_*_uclass_*)));
  34. }
  35. #endif
  36. . = .;
  37. .u_boot_list : {
  38. KEEP(*(SORT(.u_boot_list*_i2c_*)));
  39. }
  40. . = ALIGN(4);
  41. __image_copy_end = .;
  42. .rel.dyn : {
  43. __rel_dyn_start = .;
  44. *(.rel*)
  45. __rel_dyn_end = .;
  46. }
  47. .end :
  48. {
  49. *(.__end)
  50. }
  51. _image_binary_end = .;
  52. .bss __rel_dyn_start (OVERLAY) : {
  53. __bss_start = .;
  54. *(.bss*)
  55. . = ALIGN(4);
  56. __bss_end = .;
  57. }
  58. __bss_size = __bss_end - __bss_start;
  59. .dynsym _image_binary_end : { *(.dynsym) }
  60. .dynbss : { *(.dynbss) }
  61. .dynstr : { *(.dynstr*) }
  62. .dynamic : { *(.dynamic*) }
  63. .hash : { *(.hash*) }
  64. .plt : { *(.plt*) }
  65. .interp : { *(.interp*) }
  66. .gnu : { *(.gnu*) }
  67. .ARM.exidx : { *(.ARM.exidx*) }
  68. }
  69. #if defined(CONFIG_SPL_MAX_SIZE)
  70. ASSERT(__image_copy_end - __image_copy_start < (CONFIG_SPL_MAX_SIZE), \
  71. "SPL image too big");
  72. #endif
  73. #if defined(CONFIG_SPL_BSS_MAX_SIZE)
  74. ASSERT(__bss_end - __bss_start < (CONFIG_SPL_BSS_MAX_SIZE), \
  75. "SPL image BSS too big");
  76. #endif
  77. #if defined(CONFIG_SPL_MAX_FOOTPRINT)
  78. ASSERT(__bss_end - _start < (CONFIG_SPL_MAX_FOOTPRINT), \
  79. "SPL image plus BSS too big");
  80. #endif