u-boot.lds 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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/dragonboard820c/head.o (.text*)
  20. CPUDIR/start.o (.text*)
  21. *(.text*)
  22. }
  23. . = ALIGN(8);
  24. .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
  25. . = ALIGN(8);
  26. .data : {
  27. *(.data*)
  28. }
  29. . = ALIGN(8);
  30. . = .;
  31. . = ALIGN(8);
  32. .u_boot_list : {
  33. KEEP(*(SORT(.u_boot_list*)));
  34. }
  35. . = ALIGN(8);
  36. .efi_runtime : {
  37. __efi_runtime_start = .;
  38. *(efi_runtime_text)
  39. *(efi_runtime_data)
  40. __efi_runtime_stop = .;
  41. }
  42. .efi_runtime_rel : {
  43. __efi_runtime_rel_start = .;
  44. *(.relaefi_runtime_text)
  45. *(.relaefi_runtime_data)
  46. __efi_runtime_rel_stop = .;
  47. }
  48. . = ALIGN(8);
  49. .image_copy_end :
  50. {
  51. *(.__image_copy_end)
  52. }
  53. . = ALIGN(8);
  54. .rel_dyn_start :
  55. {
  56. *(.__rel_dyn_start)
  57. }
  58. .rela.dyn : {
  59. *(.rela*)
  60. }
  61. .rel_dyn_end :
  62. {
  63. *(.__rel_dyn_end)
  64. }
  65. _end = .;
  66. . = ALIGN(8);
  67. .bss_start : {
  68. KEEP(*(.__bss_start));
  69. }
  70. .bss : {
  71. *(.bss*)
  72. . = ALIGN(8);
  73. }
  74. .bss_end : {
  75. KEEP(*(.__bss_end));
  76. }
  77. /DISCARD/ : { *(.dynsym) }
  78. /DISCARD/ : { *(.dynstr*) }
  79. /DISCARD/ : { *(.dynamic*) }
  80. /DISCARD/ : { *(.plt*) }
  81. /DISCARD/ : { *(.interp*) }
  82. /DISCARD/ : { *(.gnu*) }
  83. }