u-boot.lds 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 : { *(.rel.dyn) }
  37. __rel_dyn_end = .;
  38. . = ALIGN(4);
  39. _end = .;
  40. .bss __rel_dyn_start (OVERLAY) : {
  41. __bss_start = .;
  42. *(.bss)
  43. *(COM*)
  44. . = ALIGN(4);
  45. __bss_end = .;
  46. }
  47. /DISCARD/ : { *(.dynstr*) }
  48. /DISCARD/ : { *(.dynamic*) }
  49. /DISCARD/ : { *(.plt*) }
  50. /DISCARD/ : { *(.interp*) }
  51. /DISCARD/ : { *(.gnu*) }
  52. #ifdef CONFIG_X86_RESET_VECTOR
  53. /*
  54. * The following expressions place the 16-bit Real-Mode code and
  55. * Reset Vector at the end of the Flash ROM
  56. */
  57. . = START_16;
  58. .start16 : AT (CONFIG_SYS_TEXT_BASE + (CONFIG_SYS_MONITOR_LEN - RESET_SEG_SIZE + START_16)) { KEEP(*(.start16)); }
  59. . = RESET_VEC_LOC;
  60. .resetvec : AT (CONFIG_SYS_TEXT_BASE + (CONFIG_SYS_MONITOR_LEN - RESET_SEG_SIZE + RESET_VEC_LOC)) { KEEP(*(.resetvec)); }
  61. #endif
  62. }