u-boot.lds 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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. }
  21. /* This needs to come before *(.text*) */
  22. .__efi_runtime_start : {
  23. *(.__efi_runtime_start)
  24. }
  25. .efi_runtime : {
  26. *(.text.efi_runtime*)
  27. *(.rodata.efi_runtime*)
  28. *(.data.efi_runtime*)
  29. }
  30. .__efi_runtime_stop : {
  31. *(.__efi_runtime_stop)
  32. }
  33. .text_rest :
  34. {
  35. *(.text*)
  36. }
  37. . = ALIGN(4);
  38. .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
  39. . = ALIGN(4);
  40. .data : {
  41. *(.data*)
  42. }
  43. . = ALIGN(4);
  44. . = .;
  45. . = ALIGN(4);
  46. .u_boot_list : {
  47. KEEP(*(SORT(.u_boot_list*)));
  48. }
  49. . = ALIGN(4);
  50. .efi_runtime_rel_start :
  51. {
  52. *(.__efi_runtime_rel_start)
  53. }
  54. .efi_runtime_rel : {
  55. *(.rel*.efi_runtime)
  56. *(.rel*.efi_runtime.*)
  57. }
  58. .efi_runtime_rel_stop :
  59. {
  60. *(.__efi_runtime_rel_stop)
  61. }
  62. . = ALIGN(4);
  63. .image_copy_end :
  64. {
  65. *(.__image_copy_end)
  66. }
  67. .rel_dyn_start :
  68. {
  69. *(.__rel_dyn_start)
  70. }
  71. .rel.dyn : {
  72. *(.rel*)
  73. }
  74. .rel_dyn_end :
  75. {
  76. *(.__rel_dyn_end)
  77. }
  78. .end :
  79. {
  80. *(.__end)
  81. }
  82. _image_binary_end = .;
  83. /*
  84. * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c
  85. * __bss_base and __bss_limit are for linker only (overlay ordering)
  86. */
  87. .bss_start __rel_dyn_start (OVERLAY) : {
  88. KEEP(*(.__bss_start));
  89. __bss_base = .;
  90. }
  91. .bss __bss_base (OVERLAY) : {
  92. *(.bss*)
  93. . = ALIGN(4);
  94. __bss_limit = .;
  95. }
  96. .bss_end __bss_limit (OVERLAY) : {
  97. KEEP(*(.__bss_end));
  98. }
  99. /*
  100. * Zynq needs to discard these sections because the user
  101. * is expected to pass this image on to tools for boot.bin
  102. * generation that require them to be dropped.
  103. */
  104. /DISCARD/ : { *(.dynsym) }
  105. /DISCARD/ : { *(.dynbss*) }
  106. /DISCARD/ : { *(.dynstr*) }
  107. /DISCARD/ : { *(.dynamic*) }
  108. /DISCARD/ : { *(.plt*) }
  109. /DISCARD/ : { *(.interp*) }
  110. /DISCARD/ : { *(.gnu*) }
  111. /DISCARD/ : { *(.ARM.exidx*) }
  112. /DISCARD/ : { *(.gnu.linkonce.armexidx.*) }
  113. }