u-boot-spl.lds 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. . = IMAGE_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 : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
  25. . = ALIGN(4);
  26. .data : { *(.data*) }
  27. . = ALIGN(4);
  28. __data_end = .;
  29. __init_end = .;
  30. . = ALIGN(4);
  31. .binman_sym_table : {
  32. __binman_sym_start = .;
  33. KEEP(*(SORT(.binman_sym*)));
  34. __binman_sym_end = .;
  35. }
  36. _image_binary_end = .;
  37. . = 0x120000;
  38. .bss (OVERLAY) : {
  39. __bss_start = .;
  40. *(.bss*)
  41. *(COM*)
  42. . = ALIGN(4);
  43. __bss_end = .;
  44. }
  45. __bss_size = __bss_end - __bss_start;
  46. /DISCARD/ : { *(.dynstr*) }
  47. /DISCARD/ : { *(.dynamic*) }
  48. /DISCARD/ : { *(.plt*) }
  49. /DISCARD/ : { *(.interp*) }
  50. /DISCARD/ : { *(.gnu*) }
  51. #if defined(CONFIG_SPL_X86_16BIT_INIT) || defined(CONFIG_TPL_X86_16BIT_INIT)
  52. /*
  53. * The following expressions place the 16-bit Real-Mode code and
  54. * Reset Vector at the end of the Flash ROM
  55. */
  56. . = START_16 - RESET_SEG_START;
  57. .start16 : AT (START_16) {
  58. KEEP(*(.start16));
  59. }
  60. . = RESET_VEC_LOC - RESET_SEG_START;
  61. .resetvec : AT (RESET_VEC_LOC) {
  62. KEEP(*(.resetvec));
  63. }
  64. #endif
  65. }