vmlinux.lds.S 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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. *
  10. *
  11. * This program is free software; you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License as published by
  13. * the Free Software Foundation; either version 2 of the License, or
  14. * (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program; if not, write to the Free Software
  23. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  24. */
  25. #include <linux/config.h>
  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. /* ld script to make hppa Linux kernel */
  31. #ifndef CONFIG_64BIT
  32. OUTPUT_FORMAT("elf32-hppa-linux")
  33. OUTPUT_ARCH(hppa)
  34. #else
  35. OUTPUT_FORMAT("elf64-hppa-linux")
  36. OUTPUT_ARCH(hppa:hppa2.0w)
  37. #endif
  38. ENTRY(_stext)
  39. #ifndef CONFIG_64BIT
  40. jiffies = jiffies_64 + 4;
  41. #else
  42. jiffies = jiffies_64;
  43. #endif
  44. SECTIONS
  45. {
  46. . = KERNEL_BINARY_TEXT_START;
  47. _text = .; /* Text and read-only data */
  48. .text ALIGN(16) : {
  49. *(.text)
  50. SCHED_TEXT
  51. LOCK_TEXT
  52. *(.text.do_softirq)
  53. *(.text.sys_exit)
  54. *(.text.do_sigaltstack)
  55. *(.text.do_fork)
  56. *(.text.*)
  57. *(.fixup)
  58. *(.lock.text) /* out-of-line lock text */
  59. *(.gnu.warning)
  60. } = 0
  61. _etext = .; /* End of text section */
  62. RODATA
  63. /* writeable */
  64. . = ALIGN(4096); /* Make sure this is paged aligned so
  65. that we can properly leave these
  66. as writable */
  67. data_start = .;
  68. . = ALIGN(16); /* Exception table */
  69. __start___ex_table = .;
  70. __ex_table : { *(__ex_table) }
  71. __stop___ex_table = .;
  72. __start___unwind = .; /* unwind info */
  73. .PARISC.unwind : { *(.PARISC.unwind) }
  74. __stop___unwind = .;
  75. .data : { /* Data */
  76. *(.data)
  77. *(.data.vm0.pmd)
  78. *(.data.vm0.pgd)
  79. *(.data.vm0.pte)
  80. CONSTRUCTORS
  81. }
  82. . = ALIGN(4096);
  83. /* nosave data is really only used for software suspend...it's here
  84. * just in case we ever implement it */
  85. __nosave_begin = .;
  86. .data_nosave : { *(.data.nosave) }
  87. . = ALIGN(4096);
  88. __nosave_end = .;
  89. . = ALIGN(L1_CACHE_BYTES);
  90. .data.cacheline_aligned : { *(.data.cacheline_aligned) }
  91. /* PA-RISC locks requires 16-byte alignment */
  92. . = ALIGN(16);
  93. .data.lock_aligned : { *(.data.lock_aligned) }
  94. _edata = .; /* End of data section */
  95. . = ALIGN(16384); /* init_task */
  96. .data.init_task : { *(.data.init_task) }
  97. /* The interrupt stack is currently partially coded, but not yet
  98. * implemented */
  99. . = ALIGN(16384);
  100. init_istack : { *(init_istack) }
  101. #ifdef CONFIG_64BIT
  102. . = ALIGN(16); /* Linkage tables */
  103. .opd : { *(.opd) } PROVIDE (__gp = .);
  104. .plt : { *(.plt) }
  105. .dlt : { *(.dlt) }
  106. #endif
  107. . = ALIGN(16384);
  108. __init_begin = .;
  109. .init.text : {
  110. _sinittext = .;
  111. *(.init.text)
  112. _einittext = .;
  113. }
  114. .init.data : { *(.init.data) }
  115. . = ALIGN(16);
  116. __setup_start = .;
  117. .init.setup : { *(.init.setup) }
  118. __setup_end = .;
  119. __initcall_start = .;
  120. .initcall.init : {
  121. *(.initcall1.init)
  122. *(.initcall2.init)
  123. *(.initcall3.init)
  124. *(.initcall4.init)
  125. *(.initcall5.init)
  126. *(.initcall6.init)
  127. *(.initcall7.init)
  128. }
  129. __initcall_end = .;
  130. __con_initcall_start = .;
  131. .con_initcall.init : { *(.con_initcall.init) }
  132. __con_initcall_end = .;
  133. SECURITY_INIT
  134. /* alternate instruction replacement. This is a mechanism x86 uses
  135. * to detect the CPU type and replace generic instruction sequences
  136. * with CPU specific ones. We don't currently do this in PA, but
  137. * it seems like a good idea... */
  138. . = ALIGN(4);
  139. __alt_instructions = .;
  140. .altinstructions : { *(.altinstructions) }
  141. __alt_instructions_end = .;
  142. .altinstr_replacement : { *(.altinstr_replacement) }
  143. /* .exit.text is discard at runtime, not link time, to deal with references
  144. from .altinstructions and .eh_frame */
  145. .exit.text : { *(.exit.text) }
  146. .exit.data : { *(.exit.data) }
  147. . = ALIGN(4096);
  148. __initramfs_start = .;
  149. .init.ramfs : { *(.init.ramfs) }
  150. __initramfs_end = .;
  151. . = ALIGN(32);
  152. __per_cpu_start = .;
  153. .data.percpu : { *(.data.percpu) }
  154. __per_cpu_end = .;
  155. . = ALIGN(4096);
  156. __init_end = .;
  157. /* freed after init ends here */
  158. __bss_start = .; /* BSS */
  159. .bss : { *(.bss) *(COMMON) }
  160. __bss_stop = .;
  161. _end = . ;
  162. /* Sections to be discarded */
  163. /DISCARD/ : {
  164. *(.exitcall.exit)
  165. #ifdef CONFIG_64BIT
  166. /* temporary hack until binutils is fixed to not emit these
  167. for static binaries */
  168. *(.interp)
  169. *(.dynsym)
  170. *(.dynstr)
  171. *(.dynamic)
  172. *(.hash)
  173. #endif
  174. }
  175. /* Stabs debugging sections. */
  176. .stab 0 : { *(.stab) }
  177. .stabstr 0 : { *(.stabstr) }
  178. .stab.excl 0 : { *(.stab.excl) }
  179. .stab.exclstr 0 : { *(.stab.exclstr) }
  180. .stab.index 0 : { *(.stab.index) }
  181. .stab.indexstr 0 : { *(.stab.indexstr) }
  182. .comment 0 : { *(.comment) }
  183. .note 0 : { *(.note) }
  184. }