u-boot.lds 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. . = CONFIG_SYS_TEXT_BASE; /* Location of bootcode in flash */
  14. __text_start = .;
  15. .text : { *(.text*); }
  16. . = ALIGN(4);
  17. . = ALIGN(4);
  18. .u_boot_list : {
  19. KEEP(*(SORT(.u_boot_list*)));
  20. }
  21. . = ALIGN(4);
  22. .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
  23. . = ALIGN(4);
  24. .data : { *(.data*) }
  25. . = ALIGN(4);
  26. .hash : { *(.hash*) }
  27. . = ALIGN(4);
  28. .got : { *(.got*) }
  29. . = ALIGN(4);
  30. __data_end = .;
  31. __init_end = .;
  32. . = ALIGN(4);
  33. .dynsym : { *(.dynsym*) }
  34. . = ALIGN(4);
  35. __rel_dyn_start = .;
  36. .rel.dyn : {
  37. *(.rel*)
  38. }
  39. __rel_dyn_end = .;
  40. . = ALIGN(4);
  41. _end = .;
  42. .bss __rel_dyn_start (OVERLAY) : {
  43. __bss_start = .;
  44. *(.bss)
  45. *(COM*)
  46. . = ALIGN(4);
  47. __bss_end = .;
  48. }
  49. /DISCARD/ : { *(.dynstr*) }
  50. /DISCARD/ : { *(.dynamic*) }
  51. /DISCARD/ : { *(.plt*) }
  52. /DISCARD/ : { *(.interp*) }
  53. /DISCARD/ : { *(.gnu*) }
  54. #ifdef CONFIG_X86_RESET_VECTOR
  55. /*
  56. * The following expressions place the 16-bit Real-Mode code and
  57. * Reset Vector at the end of the Flash ROM
  58. */
  59. . = START_16 - RESET_SEG_START;
  60. .start16 : AT (START_16) {
  61. KEEP(*(.start16));
  62. }
  63. . = RESET_VEC_LOC - RESET_SEG_START;
  64. .resetvec : AT (RESET_VEC_LOC) {
  65. KEEP(*(.resetvec));
  66. }
  67. #endif
  68. }