u-boot-spl.lds 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. CPUDIR/start.o (.text*)
  20. *(.text*)
  21. }
  22. . = ALIGN(4);
  23. .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
  24. . = ALIGN(4);
  25. .data : {
  26. *(.data*)
  27. }
  28. . = ALIGN(4);
  29. . = .;
  30. __image_copy_end = .;
  31. .rel.dyn : {
  32. __rel_dyn_start = .;
  33. *(.rel*)
  34. __rel_dyn_end = .;
  35. }
  36. _end = .;
  37. .bss __rel_dyn_start (OVERLAY) : {
  38. __bss_start = .;
  39. *(.bss*)
  40. . = ALIGN(4);
  41. __bss_end = .;
  42. }
  43. .dynsym _end : { *(.dynsym) }
  44. .dynbss : { *(.dynbss) }
  45. .dynstr : { *(.dynstr*) }
  46. .dynamic : { *(.dynamic*) }
  47. .hash : { *(.hash*) }
  48. .plt : { *(.plt*) }
  49. .interp : { *(.interp*) }
  50. .gnu : { *(.gnu*) }
  51. .ARM.exidx : { *(.ARM.exidx*) }
  52. }
  53. #if defined(CONFIG_SPL_MAX_SIZE)
  54. ASSERT(__image_copy_end - __image_copy_start < (CONFIG_SPL_MAX_SIZE), \
  55. "SPL image too big");
  56. #endif
  57. #if defined(CONFIG_SPL_BSS_MAX_SIZE)
  58. ASSERT(__bss_end - __bss_start < (CONFIG_SPL_BSS_MAX_SIZE), \
  59. "SPL image BSS too big");
  60. #endif
  61. #if defined(CONFIG_SPL_MAX_FOOTPRINT)
  62. ASSERT(__bss_end - _start < (CONFIG_SPL_MAX_FOOTPRINT), \
  63. "SPL image plus BSS too big");
  64. #endif