vmlinux.lds.S 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. #include <asm/asm-offsets.h>
  2. #include <asm-generic/vmlinux.lds.h>
  3. #undef mips
  4. #define mips mips
  5. OUTPUT_ARCH(mips)
  6. ENTRY(kernel_entry)
  7. jiffies = JIFFIES;
  8. SECTIONS
  9. {
  10. #ifdef CONFIG_BOOT_ELF64
  11. /* Read-only sections, merged into text segment: */
  12. /* . = 0xc000000000000000; */
  13. /* This is the value for an Origin kernel, taken from an IRIX kernel. */
  14. /* . = 0xc00000000001c000; */
  15. /* Set the vaddr for the text segment to a value
  16. >= 0xa800 0000 0001 9000 if no symmon is going to configured
  17. >= 0xa800 0000 0030 0000 otherwise */
  18. /* . = 0xa800000000300000; */
  19. /* . = 0xa800000000300000; */
  20. . = 0xffffffff80300000;
  21. #endif
  22. . = LOADADDR;
  23. /* read-only */
  24. _text = .; /* Text and read-only data */
  25. .text : {
  26. *(.text)
  27. SCHED_TEXT
  28. LOCK_TEXT
  29. *(.fixup)
  30. *(.gnu.warning)
  31. } =0
  32. _etext = .; /* End of text section */
  33. . = ALIGN(16); /* Exception table */
  34. __start___ex_table = .;
  35. __ex_table : { *(__ex_table) }
  36. __stop___ex_table = .;
  37. __start___dbe_table = .; /* Exception table for data bus errors */
  38. __dbe_table : { *(__dbe_table) }
  39. __stop___dbe_table = .;
  40. RODATA
  41. /* writeable */
  42. .data : { /* Data */
  43. . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */
  44. *(.data.init_task)
  45. *(.data)
  46. CONSTRUCTORS
  47. }
  48. _gp = . + 0x8000;
  49. .lit8 : { *(.lit8) }
  50. .lit4 : { *(.lit4) }
  51. /* We want the small data sections together, so single-instruction offsets
  52. can access them all, and initialized data all before uninitialized, so
  53. we can shorten the on-disk segment size. */
  54. .sdata : { *(.sdata) }
  55. . = ALIGN(_PAGE_SIZE);
  56. __nosave_begin = .;
  57. .data_nosave : { *(.data.nosave) }
  58. . = ALIGN(_PAGE_SIZE);
  59. __nosave_end = .;
  60. . = ALIGN(32);
  61. .data.cacheline_aligned : { *(.data.cacheline_aligned) }
  62. _edata = .; /* End of data section */
  63. /* will be freed after init */
  64. . = ALIGN(_PAGE_SIZE); /* Init code and data */
  65. __init_begin = .;
  66. .init.text : {
  67. _sinittext = .;
  68. *(.init.text)
  69. _einittext = .;
  70. }
  71. .init.data : { *(.init.data) }
  72. . = ALIGN(16);
  73. __setup_start = .;
  74. .init.setup : { *(.init.setup) }
  75. __setup_end = .;
  76. __initcall_start = .;
  77. .initcall.init : {
  78. INITCALLS
  79. }
  80. __initcall_end = .;
  81. __con_initcall_start = .;
  82. .con_initcall.init : { *(.con_initcall.init) }
  83. __con_initcall_end = .;
  84. SECURITY_INIT
  85. /* .exit.text is discarded at runtime, not link time, to deal with
  86. references from .rodata */
  87. .exit.text : { *(.exit.text) }
  88. . = ALIGN(_PAGE_SIZE);
  89. __initramfs_start = .;
  90. .init.ramfs : { *(.init.ramfs) }
  91. __initramfs_end = .;
  92. . = ALIGN(32);
  93. __per_cpu_start = .;
  94. .data.percpu : { *(.data.percpu) }
  95. __per_cpu_end = .;
  96. . = ALIGN(_PAGE_SIZE);
  97. __init_end = .;
  98. /* freed after init ends here */
  99. __bss_start = .; /* BSS */
  100. .sbss : {
  101. *(.sbss)
  102. *(.scommon)
  103. }
  104. .bss : {
  105. *(.bss)
  106. *(COMMON)
  107. }
  108. __bss_stop = .;
  109. _end = . ;
  110. /* Sections to be discarded */
  111. /DISCARD/ : {
  112. *(.exit.data)
  113. *(.exitcall.exit)
  114. /* ABI crap starts here */
  115. *(.comment)
  116. *(.MIPS.options)
  117. *(.note)
  118. *(.options)
  119. *(.pdr)
  120. *(.reginfo)
  121. *(.mdebug*)
  122. }
  123. /* This is the MIPS specific mdebug section. */
  124. .mdebug : { *(.mdebug) }
  125. STABS_DEBUG
  126. DWARF_DEBUG
  127. /* These must appear regardless of . */
  128. .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
  129. .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
  130. .note : { *(.note) }
  131. }