u-boot-spl.lds 1.4 KB

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