u-boot.lds 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. /*
  2. * (C) Copyright 2002
  3. * Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #include <config.h>
  8. OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
  9. OUTPUT_ARCH(i386)
  10. ENTRY(_start)
  11. SECTIONS
  12. {
  13. #ifndef CONFIG_CMDLINE
  14. /DISCARD/ : { *(.u_boot_list_2_cmd_*) }
  15. #endif
  16. . = CONFIG_SYS_TEXT_BASE; /* Location of bootcode in flash */
  17. __text_start = .;
  18. .text : { *(.text*); }
  19. . = ALIGN(4);
  20. . = ALIGN(4);
  21. .u_boot_list : {
  22. KEEP(*(SORT(.u_boot_list*)));
  23. }
  24. . = ALIGN(4);
  25. .rodata : {
  26. *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
  27. KEEP(*(.rodata.efi.init));
  28. }
  29. . = ALIGN(4);
  30. .data : { *(.data*) }
  31. . = ALIGN(4);
  32. .hash : { *(.hash*) }
  33. . = ALIGN(4);
  34. .got : { *(.got*) }
  35. . = ALIGN(4);
  36. .__efi_runtime_start : {
  37. *(.__efi_runtime_start)
  38. }
  39. .efi_runtime : {
  40. *(efi_runtime_text)
  41. *(efi_runtime_data)
  42. }
  43. .__efi_runtime_stop : {
  44. *(.__efi_runtime_stop)
  45. }
  46. .efi_runtime_rel_start :
  47. {
  48. *(.__efi_runtime_rel_start)
  49. }
  50. .efi_runtime_rel : {
  51. *(.relefi_runtime_text)
  52. *(.relefi_runtime_data)
  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. .rel.dyn : {
  66. *(.rel*)
  67. }
  68. __rel_dyn_end = .;
  69. . = ALIGN(4);
  70. _end = .;
  71. .bss __rel_dyn_start (OVERLAY) : {
  72. __bss_start = .;
  73. *(.bss)
  74. *(COM*)
  75. . = ALIGN(4);
  76. __bss_end = .;
  77. }
  78. /DISCARD/ : { *(.dynstr*) }
  79. /DISCARD/ : { *(.dynamic*) }
  80. /DISCARD/ : { *(.plt*) }
  81. /DISCARD/ : { *(.interp*) }
  82. /DISCARD/ : { *(.gnu*) }
  83. #ifdef CONFIG_X86_RESET_VECTOR
  84. /*
  85. * The following expressions place the 16-bit Real-Mode code and
  86. * Reset Vector at the end of the Flash ROM
  87. */
  88. . = START_16 - RESET_SEG_START;
  89. .start16 : AT (START_16) {
  90. KEEP(*(.start16));
  91. }
  92. . = RESET_VEC_LOC - RESET_SEG_START;
  93. .resetvec : AT (RESET_VEC_LOC) {
  94. KEEP(*(.resetvec));
  95. }
  96. #endif
  97. }