u-boot.lds 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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. #include <config.h>
  10. OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
  11. OUTPUT_ARCH(arm)
  12. ENTRY(_start)
  13. SECTIONS
  14. {
  15. . = 0x00000000;
  16. . = ALIGN(4);
  17. .text :
  18. {
  19. *(.__image_copy_start)
  20. *(.vectors)
  21. CPUDIR/start.o (.text*)
  22. *(.text*)
  23. }
  24. #if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT) || defined(CONFIG_ARMV7_PSCI)
  25. #ifndef CONFIG_ARMV7_SECURE_BASE
  26. #define CONFIG_ARMV7_SECURE_BASE
  27. #endif
  28. .__secure_start : {
  29. . = ALIGN(0x1000);
  30. *(.__secure_start)
  31. }
  32. .secure_text CONFIG_ARMV7_SECURE_BASE :
  33. AT(ADDR(.__secure_start) + SIZEOF(.__secure_start))
  34. {
  35. *(._secure.text)
  36. }
  37. . = LOADADDR(.__secure_start) +
  38. SIZEOF(.__secure_start) +
  39. SIZEOF(.secure_text);
  40. __secure_end_lma = .;
  41. .__secure_end : AT(__secure_end_lma) {
  42. *(.__secure_end)
  43. LONG(0x1d1071c); /* Must output something to reset LMA */
  44. }
  45. #endif
  46. . = ALIGN(4);
  47. .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
  48. . = ALIGN(4);
  49. .data : {
  50. *(.data*)
  51. }
  52. . = ALIGN(4);
  53. . = .;
  54. . = ALIGN(4);
  55. .u_boot_list : {
  56. KEEP(*(SORT(.u_boot_list*)));
  57. }
  58. . = ALIGN(4);
  59. .image_copy_end :
  60. {
  61. *(.__image_copy_end)
  62. }
  63. .rel_dyn_start :
  64. {
  65. *(.__rel_dyn_start)
  66. }
  67. .rel.dyn : {
  68. *(.rel*)
  69. }
  70. .rel_dyn_end :
  71. {
  72. *(.__rel_dyn_end)
  73. }
  74. .end :
  75. {
  76. *(.__end)
  77. }
  78. _image_binary_end = .;
  79. /*
  80. * Deprecated: this MMU section is used by pxa at present but
  81. * should not be used by new boards/CPUs.
  82. */
  83. . = ALIGN(4096);
  84. .mmutable : {
  85. *(.mmutable)
  86. }
  87. /*
  88. * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c
  89. * __bss_base and __bss_limit are for linker only (overlay ordering)
  90. */
  91. .bss_start __rel_dyn_start (OVERLAY) : {
  92. KEEP(*(.__bss_start));
  93. __bss_base = .;
  94. }
  95. .bss __bss_base (OVERLAY) : {
  96. *(.bss*)
  97. . = ALIGN(4);
  98. __bss_limit = .;
  99. }
  100. .bss_end __bss_limit (OVERLAY) : {
  101. KEEP(*(.__bss_end));
  102. }
  103. .dynsym _image_binary_end : { *(.dynsym) }
  104. .dynbss : { *(.dynbss) }
  105. .dynstr : { *(.dynstr*) }
  106. .dynamic : { *(.dynamic*) }
  107. .plt : { *(.plt*) }
  108. .interp : { *(.interp*) }
  109. .gnu.hash : { *(.gnu.hash) }
  110. .gnu : { *(.gnu*) }
  111. .ARM.exidx : { *(.ARM.exidx*) }
  112. .gnu.linkonce.armexidx : { *(.gnu.linkonce.armexidx.*) }
  113. }