vmlinux.lds.S 3.8 KB

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