u-boot-64.lds 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * (C) Copyright 2002
  4. * Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
  5. */
  6. #include <config.h>
  7. OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
  8. OUTPUT_ARCH(i386:x86-64)
  9. ENTRY(_start)
  10. SECTIONS
  11. {
  12. #ifndef CONFIG_CMDLINE
  13. /DISCARD/ : { *(.u_boot_list_2_cmd_*) }
  14. #endif
  15. . = CONFIG_SYS_TEXT_BASE; /* Location of bootcode in flash */
  16. __text_start = .;
  17. .text.start : { *(.text.start); }
  18. .__efi_runtime_start : {
  19. *(.__efi_runtime_start)
  20. }
  21. .efi_runtime : {
  22. *(.text.efi_runtime*)
  23. *(.rodata.efi_runtime*)
  24. *(.data.efi_runtime*)
  25. }
  26. .__efi_runtime_stop : {
  27. *(.__efi_runtime_stop)
  28. }
  29. .text : { *(.text*); }
  30. . = ALIGN(4);
  31. . = ALIGN(4);
  32. .u_boot_list : {
  33. KEEP(*(SORT(.u_boot_list*)));
  34. }
  35. . = ALIGN(4);
  36. .rodata : {
  37. *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
  38. KEEP(*(.rodata.efi.init));
  39. }
  40. . = ALIGN(4);
  41. .data : { *(.data*) }
  42. . = ALIGN(4);
  43. .hash : { *(.hash*) }
  44. . = ALIGN(4);
  45. .got : { *(.got*) }
  46. .efi_runtime_rel_start :
  47. {
  48. *(.__efi_runtime_rel_start)
  49. }
  50. .efi_runtime_rel : {
  51. *(.rel*.efi_runtime)
  52. *(.rel*.efi_runtime.*)
  53. }
  54. .efi_runtime_rel_stop :
  55. {
  56. *(.__efi_runtime_rel_stop)
  57. }
  58. . = ALIGN(4);
  59. __data_end = .;
  60. __init_end = .;
  61. . = ALIGN(4);
  62. .dynsym : { *(.dynsym*) }
  63. . = ALIGN(4);
  64. __rel_dyn_start = .;
  65. .rela.dyn : {
  66. *(.rela*)
  67. }
  68. __rel_dyn_end = .;
  69. . = ALIGN(4);
  70. .dynamic : { *(.dynamic) }
  71. . = ALIGN(4);
  72. _end = .;
  73. .bss __rel_dyn_start (OVERLAY) : {
  74. __bss_start = .;
  75. *(.bss*)
  76. *(COM*)
  77. . = ALIGN(4);
  78. __bss_end = .;
  79. }
  80. /DISCARD/ : { *(.dynsym) }
  81. /DISCARD/ : { *(.dynstr*) }
  82. /DISCARD/ : { *(.dynamic*) }
  83. /DISCARD/ : { *(.plt*) }
  84. /DISCARD/ : { *(.interp*) }
  85. /DISCARD/ : { *(.gnu*) }
  86. /DISCARD/ : { *(.note.gnu.property) }
  87. }