u-boot.lds 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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("elf32-i386", "elf32-i386", "elf32-i386")
  8. OUTPUT_ARCH(i386)
  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. . = ALIGN(4);
  47. .efi_runtime_rel_start :
  48. {
  49. *(.__efi_runtime_rel_start)
  50. }
  51. .efi_runtime_rel : {
  52. *(.rel*.efi_runtime)
  53. *(.rel*.efi_runtime.*)
  54. }
  55. .efi_runtime_rel_stop :
  56. {
  57. *(.__efi_runtime_rel_stop)
  58. }
  59. . = ALIGN(4);
  60. __data_end = .;
  61. __init_end = .;
  62. . = ALIGN(4);
  63. .dynsym : { *(.dynsym*) }
  64. . = ALIGN(4);
  65. __rel_dyn_start = .;
  66. .rel.dyn : {
  67. *(.rel*)
  68. }
  69. __rel_dyn_end = .;
  70. . = ALIGN(4);
  71. _end = .;
  72. .bss __rel_dyn_start (OVERLAY) : {
  73. __bss_start = .;
  74. *(.bss*)
  75. *(COM*)
  76. . = ALIGN(4);
  77. __bss_end = .;
  78. }
  79. /DISCARD/ : { *(.dynstr*) }
  80. /DISCARD/ : { *(.dynamic*) }
  81. /DISCARD/ : { *(.plt*) }
  82. /DISCARD/ : { *(.interp*) }
  83. /DISCARD/ : { *(.gnu*) }
  84. /DISCARD/ : { *(.note.gnu.property) }
  85. #ifdef CONFIG_X86_16BIT_INIT
  86. /*
  87. * The following expressions place the 16-bit Real-Mode code and
  88. * Reset Vector at the end of the Flash ROM
  89. */
  90. . = START_16 - RESET_SEG_START;
  91. .start16 : AT (START_16) {
  92. KEEP(*(.start16));
  93. }
  94. . = RESET_VEC_LOC - RESET_SEG_START;
  95. .resetvec : AT (RESET_VEC_LOC) {
  96. KEEP(*(.resetvec));
  97. }
  98. #endif
  99. }