u-boot-spl.lds 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. * Copyright (C) 2011 Marek Vasut <marek.vasut@gmail.com>
  3. * on behalf of DENX Software Engineering GmbH
  4. *
  5. * January 2004 - Changed to support H4 device
  6. * Copyright (c) 2004-2008 Texas Instruments
  7. *
  8. * (C) Copyright 2002
  9. * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
  10. *
  11. * See file CREDITS for list of people who contributed to this
  12. * project.
  13. *
  14. * This program is free software; you can redistribute it and/or
  15. * modify it under the terms of the GNU General Public License as
  16. * published by the Free Software Foundation; either version 2 of
  17. * the License, or (at your option) any later version.
  18. *
  19. * This program is distributed in the hope that it will be useful,
  20. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. * GNU General Public License for more details.
  23. *
  24. * You should have received a copy of the GNU General Public License
  25. * along with this program; if not, write to the Free Software
  26. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  27. * MA 02111-1307 USA
  28. */
  29. MEMORY
  30. {
  31. sram (rwx) : ORIGIN = CONFIG_SPL_TEXT_BASE, LENGTH = CONFIG_SPL_MAX_SIZE
  32. dram : ORIGIN = CONFIG_SPL_BSS_DRAM_START, LENGTH = CONFIG_SPL_BSS_DRAM_SIZE
  33. }
  34. OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
  35. OUTPUT_ARCH(arm)
  36. ENTRY(_spl_start)
  37. SECTIONS
  38. {
  39. .text.0 :
  40. {
  41. *(.init*)
  42. }
  43. /* Start of the rest of the SPL */
  44. code_start = . ;
  45. .text.1 :
  46. {
  47. *(.text*)
  48. }
  49. . = ALIGN(4);
  50. .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
  51. . = ALIGN(4);
  52. .data : {
  53. *(.data*)
  54. }
  55. . = ALIGN(4);
  56. __image_copy_end = .;
  57. code_size = . - code_start;
  58. .rel.dyn : {
  59. __rel_dyn_start = .;
  60. *(.rel*)
  61. __rel_dyn_end = .;
  62. }
  63. . = ALIGN(0x800);
  64. _end = .;
  65. .bss.sram __rel_dyn_start (OVERLAY) : {
  66. __bss_start = .;
  67. *(.bss.stdio_devices)
  68. *(.bss.serial_current)
  69. . = ALIGN(4);
  70. __bss_end = .;
  71. }
  72. .bss : {
  73. __bss_dram_start = .;
  74. *(.bss*)
  75. __bss_dram_end = .;
  76. } > dram
  77. /DISCARD/ : { *(.bss*) }
  78. /DISCARD/ : { *(.dynsym) }
  79. /DISCARD/ : { *(.dynstr*) }
  80. /DISCARD/ : { *(.dynsym*) }
  81. /DISCARD/ : { *(.dynamic*) }
  82. /DISCARD/ : { *(.hash*) }
  83. /DISCARD/ : { *(.plt*) }
  84. /DISCARD/ : { *(.interp*) }
  85. /DISCARD/ : { *(.gnu*) }
  86. }