u-boot.lds 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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 : { *(.text*); }
  18. . = ALIGN(4);
  19. . = ALIGN(4);
  20. .u_boot_list : {
  21. KEEP(*(SORT(.u_boot_list*)));
  22. }
  23. . = ALIGN(4);
  24. .rodata : {
  25. *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
  26. KEEP(*(.rodata.efi.init));
  27. }
  28. . = ALIGN(4);
  29. .data : { *(.data*) }
  30. . = ALIGN(4);
  31. .hash : { *(.hash*) }
  32. . = ALIGN(4);
  33. .got : { *(.got*) }
  34. . = ALIGN(4);
  35. .__efi_runtime_start : {
  36. *(.__efi_runtime_start)
  37. }
  38. .efi_runtime : {
  39. *(efi_runtime_text)
  40. *(efi_runtime_data)
  41. }
  42. .__efi_runtime_stop : {
  43. *(.__efi_runtime_stop)
  44. }
  45. .efi_runtime_rel_start :
  46. {
  47. *(.__efi_runtime_rel_start)
  48. }
  49. .efi_runtime_rel : {
  50. *(.relefi_runtime_text)
  51. *(.relefi_runtime_data)
  52. }
  53. .efi_runtime_rel_stop :
  54. {
  55. *(.__efi_runtime_rel_stop)
  56. }
  57. . = ALIGN(4);
  58. __data_end = .;
  59. __init_end = .;
  60. . = ALIGN(4);
  61. .dynsym : { *(.dynsym*) }
  62. . = ALIGN(4);
  63. __rel_dyn_start = .;
  64. .rel.dyn : {
  65. *(.rel*)
  66. }
  67. __rel_dyn_end = .;
  68. . = ALIGN(4);
  69. _end = .;
  70. .bss __rel_dyn_start (OVERLAY) : {
  71. __bss_start = .;
  72. *(.bss)
  73. *(COM*)
  74. . = ALIGN(4);
  75. __bss_end = .;
  76. }
  77. /DISCARD/ : { *(.dynstr*) }
  78. /DISCARD/ : { *(.dynamic*) }
  79. /DISCARD/ : { *(.plt*) }
  80. /DISCARD/ : { *(.interp*) }
  81. /DISCARD/ : { *(.gnu*) }
  82. #ifdef CONFIG_X86_16BIT_INIT
  83. /*
  84. * The following expressions place the 16-bit Real-Mode code and
  85. * Reset Vector at the end of the Flash ROM
  86. */
  87. . = START_16 - RESET_SEG_START;
  88. .start16 : AT (START_16) {
  89. KEEP(*(.start16));
  90. }
  91. . = RESET_VEC_LOC - RESET_SEG_START;
  92. .resetvec : AT (RESET_VEC_LOC) {
  93. KEEP(*(.resetvec));
  94. }
  95. #endif
  96. }