u-boot.lds 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. * (C) Copyright 2002
  3. * Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. #include <config.h>
  24. OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
  25. OUTPUT_ARCH(i386)
  26. ENTRY(_start)
  27. SECTIONS
  28. {
  29. . = CONFIG_SYS_TEXT_BASE; /* Location of bootcode in flash */
  30. __text_start = .;
  31. .text : { *(.text*); }
  32. . = ALIGN(4);
  33. . = ALIGN(4);
  34. .u_boot_list : {
  35. KEEP(*(SORT(.u_boot_list*)));
  36. }
  37. . = ALIGN(4);
  38. .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
  39. . = ALIGN(4);
  40. .data : { *(.data*) }
  41. . = ALIGN(4);
  42. .hash : { *(.hash*) }
  43. . = ALIGN(4);
  44. .got : { *(.got*) }
  45. . = ALIGN(4);
  46. __data_end = .;
  47. __init_end = .;
  48. . = ALIGN(4);
  49. .dynsym : { *(.dynsym*) }
  50. . = ALIGN(4);
  51. __rel_dyn_start = .;
  52. .rel.dyn : { *(.rel.dyn) }
  53. __rel_dyn_end = .;
  54. . = ALIGN(4);
  55. _end = .;
  56. .bss __rel_dyn_start (OVERLAY) : {
  57. __bss_start = .;
  58. *(.bss)
  59. *(COM*)
  60. . = ALIGN(4);
  61. __bss_end = .;
  62. }
  63. /DISCARD/ : { *(.dynstr*) }
  64. /DISCARD/ : { *(.dynamic*) }
  65. /DISCARD/ : { *(.plt*) }
  66. /DISCARD/ : { *(.interp*) }
  67. /DISCARD/ : { *(.gnu*) }
  68. #ifdef CONFIG_X86_RESET_VECTOR
  69. /*
  70. * The following expressions place the 16-bit Real-Mode code and
  71. * Reset Vector at the end of the Flash ROM
  72. */
  73. . = START_16;
  74. .start16 : AT (CONFIG_SYS_TEXT_BASE + (CONFIG_SYS_MONITOR_LEN - RESET_SEG_SIZE + START_16)) { KEEP(*(.start16)); }
  75. . = RESET_VEC_LOC;
  76. .resetvec : AT (CONFIG_SYS_TEXT_BASE + (CONFIG_SYS_MONITOR_LEN - RESET_SEG_SIZE + RESET_VEC_LOC)) { KEEP(*(.resetvec)); }
  77. #endif
  78. }