u-boot.lds 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. . = ALIGN(4);
  32. .u_boot_list : {
  33. KEEP(*(SORT(.u_boot_list*)));
  34. }
  35. . = ALIGN(4);
  36. .image_copy_end :
  37. {
  38. *(.__image_copy_end)
  39. }
  40. .rel_dyn_start :
  41. {
  42. *(.__rel_dyn_start)
  43. }
  44. .rel.dyn : {
  45. *(.rel*)
  46. }
  47. .rel_dyn_end :
  48. {
  49. *(.__rel_dyn_end)
  50. }
  51. .end :
  52. {
  53. *(.__end)
  54. }
  55. _image_binary_end = .;
  56. /*
  57. * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c
  58. * __bss_base and __bss_limit are for linker only (overlay ordering)
  59. */
  60. .bss_start __rel_dyn_start (OVERLAY) : {
  61. KEEP(*(.__bss_start));
  62. __bss_base = .;
  63. }
  64. .bss __bss_base (OVERLAY) : {
  65. *(.bss*)
  66. . = ALIGN(4);
  67. __bss_limit = .;
  68. }
  69. .bss_end __bss_limit (OVERLAY) : {
  70. KEEP(*(.__bss_end));
  71. }
  72. /*
  73. * Zynq needs to discard these sections because the user
  74. * is expected to pass this image on to tools for boot.bin
  75. * generation that require them to be dropped.
  76. */
  77. /DISCARD/ : { *(.dynsym) }
  78. /DISCARD/ : { *(.dynbss*) }
  79. /DISCARD/ : { *(.dynstr*) }
  80. /DISCARD/ : { *(.dynamic*) }
  81. /DISCARD/ : { *(.plt*) }
  82. /DISCARD/ : { *(.interp*) }
  83. /DISCARD/ : { *(.gnu*) }
  84. /DISCARD/ : { *(.ARM.exidx*) }
  85. /DISCARD/ : { *(.gnu.linkonce.armexidx.*) }
  86. }