vmlinux.lds.S 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. /* Kernel link layout for various "sections"
  2. *
  3. * Copyright (C) 1999-2003 Matthew Wilcox <willy at parisc-linux.org>
  4. * Copyright (C) 2000-2003 Paul Bame <bame at parisc-linux.org>
  5. * Copyright (C) 2000 John Marvin <jsm at parisc-linux.org>
  6. * Copyright (C) 2000 Michael Ang <mang with subcarrier.org>
  7. * Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org>
  8. * Copyright (C) 2003 James Bottomley <jejb with parisc-linux.org>
  9. * Copyright (C) 2006 Helge Deller <deller@gmx.de>
  10. *
  11. *
  12. * This program is free software; you can redistribute it and/or modify
  13. * it under the terms of the GNU General Public License as published by
  14. * the Free Software Foundation; either version 2 of the License, or
  15. * (at your option) any later version.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU General Public License
  23. * along with this program; if not, write to the Free Software
  24. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  25. */
  26. #include <asm-generic/vmlinux.lds.h>
  27. /* needed for the processor specific cache alignment size */
  28. #include <asm/cache.h>
  29. #include <asm/page.h>
  30. #include <asm/asm-offsets.h>
  31. #include <asm/thread_info.h>
  32. /* ld script to make hppa Linux kernel */
  33. #ifndef CONFIG_64BIT
  34. OUTPUT_FORMAT("elf32-hppa-linux")
  35. OUTPUT_ARCH(hppa)
  36. #else
  37. OUTPUT_FORMAT("elf64-hppa-linux")
  38. OUTPUT_ARCH(hppa:hppa2.0w)
  39. #endif
  40. ENTRY(_stext)
  41. #ifndef CONFIG_64BIT
  42. jiffies = jiffies_64 + 4;
  43. #else
  44. jiffies = jiffies_64;
  45. #endif
  46. SECTIONS
  47. {
  48. . = KERNEL_BINARY_TEXT_START;
  49. _text = .; /* Text and read-only data */
  50. .text ALIGN(16) : {
  51. HEAD_TEXT
  52. TEXT_TEXT
  53. SCHED_TEXT
  54. LOCK_TEXT
  55. KPROBES_TEXT
  56. IRQENTRY_TEXT
  57. *(.text.do_softirq)
  58. *(.text.sys_exit)
  59. *(.text.do_sigaltstack)
  60. *(.text.do_fork)
  61. *(.text.*)
  62. *(.fixup)
  63. *(.lock.text) /* out-of-line lock text */
  64. *(.gnu.warning)
  65. } = 0
  66. /* End of text section */
  67. _etext = .;
  68. /* Start of data section */
  69. _sdata = .;
  70. RODATA
  71. /* writeable */
  72. /* Make sure this is page aligned so
  73. * that we can properly leave these
  74. * as writable
  75. */
  76. . = ALIGN(PAGE_SIZE);
  77. data_start = .;
  78. /* unwind info */
  79. .PARISC.unwind : {
  80. __start___unwind = .;
  81. *(.PARISC.unwind)
  82. __stop___unwind = .;
  83. }
  84. EXCEPTION_TABLE(16)
  85. NOTES
  86. /* Data */
  87. RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
  88. /* PA-RISC locks requires 16-byte alignment */
  89. . = ALIGN(16);
  90. .data..lock_aligned : {
  91. *(.data..lock_aligned)
  92. }
  93. /* End of data section */
  94. _edata = .;
  95. /* BSS */
  96. __bss_start = .;
  97. /* page table entries need to be PAGE_SIZE aligned */
  98. . = ALIGN(PAGE_SIZE);
  99. .data..vmpages : {
  100. *(.data..vm0.pmd)
  101. *(.data..vm0.pgd)
  102. *(.data..vm0.pte)
  103. }
  104. .bss : {
  105. *(.bss)
  106. *(COMMON)
  107. }
  108. __bss_stop = .;
  109. #ifdef CONFIG_64BIT
  110. . = ALIGN(16);
  111. /* Linkage tables */
  112. .opd : {
  113. *(.opd)
  114. } PROVIDE (__gp = .);
  115. .plt : {
  116. *(.plt)
  117. }
  118. .dlt : {
  119. *(.dlt)
  120. }
  121. #endif
  122. /* reserve space for interrupt stack by aligning __init* to 16k */
  123. . = ALIGN(16384);
  124. __init_begin = .;
  125. INIT_TEXT_SECTION(16384)
  126. . = ALIGN(PAGE_SIZE);
  127. INIT_DATA_SECTION(16)
  128. /* we have to discard exit text and such at runtime, not link time */
  129. .exit.text :
  130. {
  131. EXIT_TEXT
  132. }
  133. .exit.data :
  134. {
  135. EXIT_DATA
  136. }
  137. PERCPU_SECTION(L1_CACHE_BYTES)
  138. . = ALIGN(PAGE_SIZE);
  139. __init_end = .;
  140. /* freed after init ends here */
  141. _end = . ;
  142. STABS_DEBUG
  143. .note 0 : { *(.note) }
  144. /* Sections to be discarded */
  145. DISCARDS
  146. /DISCARD/ : {
  147. #ifdef CONFIG_64BIT
  148. /* temporary hack until binutils is fixed to not emit these
  149. * for static binaries
  150. */
  151. *(.interp)
  152. *(.dynsym)
  153. *(.dynstr)
  154. *(.dynamic)
  155. *(.hash)
  156. *(.gnu.hash)
  157. #endif
  158. }
  159. }