ld.script 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /************************************************************
  2. * configs/c5471evm/scripts/ld.script
  3. *
  4. * Copyright (C) 2007, 2011-2012, 2014 Gregory Nutt. All rights reserved.
  5. * Author: Gregory Nutt <gnutt@nuttx.org>
  6. *
  7. * Redistribution and use in source and binary forms, with or without
  8. * modification, are permitted provided that the following conditions
  9. * are met:
  10. *
  11. * 1. Redistributions of source code must retain the above copyright
  12. * notice, this list of conditions and the following disclaimer.
  13. * 2. Redistributions in binary form must reproduce the above copyright
  14. * notice, this list of conditions and the following disclaimer in
  15. * the documentation and/or other materials provided with the
  16. * distribution.
  17. * 3. Neither the name Gregory Nutt nor the names of its contributors may be
  18. * used to endorse or promote products derived from this software
  19. * without specific prior written permission.
  20. *
  21. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  24. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  25. * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  26. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  27. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  28. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  29. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  30. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  31. * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  32. * POSSIBILITY OF SUCH DAMAGE.
  33. *
  34. ************************************************************/
  35. OUTPUT_ARCH(arm)
  36. ENTRY(_stext)
  37. SECTIONS
  38. {
  39. /* Interrupt vector trampoline and command line parameters
  40. * are provided in IRAM by the rrload bootloader. Vectors will be
  41. * copied into _svectors.
  42. */
  43. . = 0xffc00000;
  44. _svectors = ABSOLUTE(.);
  45. /* These are locations in IRAM where the rrload bootloader passes
  46. * information to the running program
  47. */
  48. . = 0xffc00020;
  49. __KernCommandLineMagicStr = .; /* magic pattern string == "kcmdline-->" */
  50. . = 0xffc0002C; /* advance to .+strlen("kcmdline-->")+1 */
  51. __KernCommandLineOverride = .; /* location of kernel command line string */
  52. . = 0xffc00100;
  53. __EtherMACMagicStr = .; /* magic pattern string == "etherMAC-->" */
  54. . = 0xffc0010C; /* advance to .+strlen("etherMAC-->")+1 */
  55. __EtherMAC = .;
  56. /* The OS entry point is here */
  57. . = 0x10300000;
  58. .text : {
  59. _stext = ABSOLUTE(.);
  60. *(.text)
  61. *(.fixup)
  62. *(.gnu.warning)
  63. *(.rodata)
  64. *(.glue_7)
  65. *(.glue_7t)
  66. *(.got) /* Global offset table */
  67. _etext = ABSOLUTE(.);
  68. }
  69. _eronly = ABSOLUTE(.); /* See below */
  70. . = ALIGN(4096);
  71. .data : {
  72. _sdata = ABSOLUTE(.);
  73. *(.data)
  74. CONSTRUCTORS
  75. _edata = ABSOLUTE(.);
  76. }
  77. .bss : { /* BSS */
  78. _sbss = ABSOLUTE(.);
  79. *(.bss)
  80. *(COMMON)
  81. _ebss = ABSOLUTE(.);
  82. }
  83. /* Stabs debugging sections. */
  84. .stab 0 : { *(.stab) }
  85. .stabstr 0 : { *(.stabstr) }
  86. .stab.excl 0 : { *(.stab.excl) }
  87. .stab.exclstr 0 : { *(.stab.exclstr) }
  88. .stab.index 0 : { *(.stab.index) }
  89. .stab.indexstr 0 : { *(.stab.indexstr) }
  90. .comment 0 : { *(.comment) }
  91. .debug_abbrev 0 : { *(.debug_abbrev) }
  92. .debug_info 0 : { *(.debug_info) }
  93. .debug_line 0 : { *(.debug_line) }
  94. .debug_pubnames 0 : { *(.debug_pubnames) }
  95. .debug_aranges 0 : { *(.debug_aranges) }
  96. }