u-boot.lds 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Override linker script for fastboot-readable images
  4. *
  5. * (C) Copyright 2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
  6. *
  7. * Based on arch/arm/cpu/armv8/u-boot.lds (Just add header)
  8. */
  9. OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")
  10. OUTPUT_ARCH(aarch64)
  11. ENTRY(_arm64_header)
  12. SECTIONS
  13. {
  14. . = 0x00000000;
  15. . = ALIGN(8);
  16. .text :
  17. {
  18. *(.__image_copy_start)
  19. board/qualcomm/dragonboard410c/head.o (.text*)
  20. CPUDIR/start.o (.text*)
  21. }
  22. /* This needs to come before *(.text*) */
  23. .efi_runtime : {
  24. __efi_runtime_start = .;
  25. *(.text.efi_runtime*)
  26. *(.rodata.efi_runtime*)
  27. *(.data.efi_runtime*)
  28. __efi_runtime_stop = .;
  29. }
  30. .text_rest :
  31. {
  32. *(.text*)
  33. }
  34. . = ALIGN(8);
  35. .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
  36. . = ALIGN(8);
  37. .data : {
  38. *(.data*)
  39. }
  40. . = ALIGN(8);
  41. . = .;
  42. . = ALIGN(8);
  43. .u_boot_list : {
  44. KEEP(*(SORT(.u_boot_list*)));
  45. }
  46. . = ALIGN(8);
  47. .efi_runtime : {
  48. __efi_runtime_start = .;
  49. *(efi_runtime_text)
  50. *(efi_runtime_data)
  51. __efi_runtime_stop = .;
  52. }
  53. .efi_runtime_rel : {
  54. __efi_runtime_rel_start = .;
  55. *(.rel*.efi_runtime)
  56. *(.rel*.efi_runtime.*)
  57. __efi_runtime_rel_stop = .;
  58. }
  59. . = ALIGN(8);
  60. .image_copy_end :
  61. {
  62. *(.__image_copy_end)
  63. }
  64. . = ALIGN(8);
  65. .rel_dyn_start :
  66. {
  67. *(.__rel_dyn_start)
  68. }
  69. .rela.dyn : {
  70. *(.rela*)
  71. }
  72. .rel_dyn_end :
  73. {
  74. *(.__rel_dyn_end)
  75. }
  76. _end = .;
  77. . = ALIGN(8);
  78. .bss_start : {
  79. KEEP(*(.__bss_start));
  80. }
  81. .bss : {
  82. *(.bss*)
  83. . = ALIGN(8);
  84. }
  85. .bss_end : {
  86. KEEP(*(.__bss_end));
  87. }
  88. /DISCARD/ : { *(.dynsym) }
  89. /DISCARD/ : { *(.dynstr*) }
  90. /DISCARD/ : { *(.dynamic*) }
  91. /DISCARD/ : { *(.plt*) }
  92. /DISCARD/ : { *(.interp*) }
  93. /DISCARD/ : { *(.gnu*) }
  94. }