vmlinux.lds.S 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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. RODATA
  69. /* writeable */
  70. /* Make sure this is page aligned so
  71. * that we can properly leave these
  72. * as writable
  73. */
  74. . = ALIGN(PAGE_SIZE);
  75. data_start = .;
  76. EXCEPTION_TABLE(16)
  77. NOTES
  78. /* unwind info */
  79. .PARISC.unwind : {
  80. __start___unwind = .;
  81. *(.PARISC.unwind)
  82. __stop___unwind = .;
  83. }
  84. /* Data */
  85. RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
  86. /* PA-RISC locks requires 16-byte alignment */
  87. . = ALIGN(16);
  88. .data.lock_aligned : {
  89. *(.data.lock_aligned)
  90. }
  91. /* End of data section */
  92. _edata = .;
  93. /* BSS */
  94. __bss_start = .;
  95. /* page table entries need to be PAGE_SIZE aligned */
  96. . = ALIGN(PAGE_SIZE);
  97. .data.vmpages : {
  98. *(.data.vm0.pmd)
  99. *(.data.vm0.pgd)
  100. *(.data.vm0.pte)
  101. }
  102. .bss : {
  103. *(.bss)
  104. *(COMMON)
  105. }
  106. __bss_stop = .;
  107. #ifdef CONFIG_64BIT
  108. . = ALIGN(16);
  109. /* Linkage tables */
  110. .opd : {
  111. *(.opd)
  112. } PROVIDE (__gp = .);
  113. .plt : {
  114. *(.plt)
  115. }
  116. .dlt : {
  117. *(.dlt)
  118. }
  119. #endif
  120. /* reserve space for interrupt stack by aligning __init* to 16k */
  121. . = ALIGN(16384);
  122. __init_begin = .;
  123. INIT_TEXT_SECTION(16384)
  124. INIT_DATA_SECTION(16)
  125. /* we have to discard exit text and such at runtime, not link time */
  126. .exit.text :
  127. {
  128. EXIT_TEXT
  129. }
  130. .exit.data :
  131. {
  132. EXIT_DATA
  133. }
  134. PERCPU(PAGE_SIZE)
  135. . = ALIGN(PAGE_SIZE);
  136. __init_end = .;
  137. /* freed after init ends here */
  138. _end = . ;
  139. STABS_DEBUG
  140. .note 0 : { *(.note) }
  141. /* Sections to be discarded */
  142. DISCARDS
  143. /DISCARD/ : {
  144. #ifdef CONFIG_64BIT
  145. /* temporary hack until binutils is fixed to not emit these
  146. * for static binaries
  147. */
  148. *(.interp)
  149. *(.dynsym)
  150. *(.dynstr)
  151. *(.dynamic)
  152. *(.hash)
  153. *(.gnu.hash)
  154. #endif
  155. }
  156. }