vmlinux.lds.S 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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-2013 Helge Deller <deller@gmx.de>
  10. */
  11. /*
  12. * Put page table entries (swapper_pg_dir) as the first thing in .bss. This
  13. * will ensure that it has .bss alignment (PAGE_SIZE).
  14. */
  15. #define BSS_FIRST_SECTIONS *(.data..vm0.pmd) \
  16. *(.data..vm0.pgd) \
  17. *(.data..vm0.pte)
  18. #include <asm-generic/vmlinux.lds.h>
  19. /* needed for the processor specific cache alignment size */
  20. #include <asm/cache.h>
  21. #include <asm/page.h>
  22. #include <asm/asm-offsets.h>
  23. #include <asm/thread_info.h>
  24. /* ld script to make hppa Linux kernel */
  25. #ifndef CONFIG_64BIT
  26. OUTPUT_FORMAT("elf32-hppa-linux")
  27. OUTPUT_ARCH(hppa)
  28. #else
  29. OUTPUT_FORMAT("elf64-hppa-linux")
  30. OUTPUT_ARCH(hppa:hppa2.0w)
  31. #endif
  32. ENTRY(parisc_kernel_start)
  33. #ifndef CONFIG_64BIT
  34. jiffies = jiffies_64 + 4;
  35. #else
  36. jiffies = jiffies_64;
  37. #endif
  38. SECTIONS
  39. {
  40. . = KERNEL_BINARY_TEXT_START;
  41. __init_begin = .;
  42. HEAD_TEXT_SECTION
  43. INIT_TEXT_SECTION(8)
  44. . = ALIGN(PAGE_SIZE);
  45. INIT_DATA_SECTION(PAGE_SIZE)
  46. /* we have to discard exit text and such at runtime, not link time */
  47. .exit.text :
  48. {
  49. EXIT_TEXT
  50. }
  51. .exit.data :
  52. {
  53. EXIT_DATA
  54. }
  55. PERCPU_SECTION(8)
  56. . = ALIGN(PAGE_SIZE);
  57. __init_end = .;
  58. /* freed after init ends here */
  59. _text = .; /* Text and read-only data */
  60. _stext = .;
  61. .text ALIGN(PAGE_SIZE) : {
  62. TEXT_TEXT
  63. SCHED_TEXT
  64. LOCK_TEXT
  65. KPROBES_TEXT
  66. IRQENTRY_TEXT
  67. *(.text.do_softirq)
  68. *(.text.sys_exit)
  69. *(.text.do_sigaltstack)
  70. *(.text.do_fork)
  71. *(.text.*)
  72. *(.fixup)
  73. *(.lock.text) /* out-of-line lock text */
  74. *(.gnu.warning)
  75. }
  76. . = ALIGN(PAGE_SIZE);
  77. _etext = .;
  78. /* End of text section */
  79. /* Start of data section */
  80. _sdata = .;
  81. RO_DATA_SECTION(8)
  82. #ifdef CONFIG_64BIT
  83. . = ALIGN(16);
  84. /* Linkage tables */
  85. .opd : {
  86. *(.opd)
  87. } PROVIDE (__gp = .);
  88. .plt : {
  89. *(.plt)
  90. }
  91. .dlt : {
  92. *(.dlt)
  93. }
  94. #endif
  95. /* unwind info */
  96. .PARISC.unwind : {
  97. __start___unwind = .;
  98. *(.PARISC.unwind)
  99. __stop___unwind = .;
  100. }
  101. /* writeable */
  102. /* Make sure this is page aligned so
  103. * that we can properly leave these
  104. * as writable
  105. */
  106. . = ALIGN(PAGE_SIZE);
  107. data_start = .;
  108. EXCEPTION_TABLE(8)
  109. NOTES
  110. /* Data */
  111. RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, PAGE_SIZE)
  112. /* PA-RISC locks requires 16-byte alignment */
  113. . = ALIGN(16);
  114. .data..lock_aligned : {
  115. *(.data..lock_aligned)
  116. }
  117. /* End of data section */
  118. _edata = .;
  119. /* BSS */
  120. BSS_SECTION(PAGE_SIZE, PAGE_SIZE, 8)
  121. _end = . ;
  122. STABS_DEBUG
  123. .note 0 : { *(.note) }
  124. /* Sections to be discarded */
  125. DISCARDS
  126. /DISCARD/ : {
  127. #ifdef CONFIG_64BIT
  128. /* temporary hack until binutils is fixed to not emit these
  129. * for static binaries
  130. */
  131. *(.interp)
  132. *(.dynsym)
  133. *(.dynstr)
  134. *(.dynamic)
  135. *(.hash)
  136. *(.gnu.hash)
  137. #endif
  138. }
  139. }