vmlinux.lds.S 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. /* ld script to make FRV Linux kernel
  2. * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
  3. */
  4. OUTPUT_FORMAT("elf32-frv", "elf32-frv", "elf32-frv")
  5. OUTPUT_ARCH(frv)
  6. ENTRY(_start)
  7. #include <asm-generic/vmlinux.lds.h>
  8. #include <asm/processor.h>
  9. #include <asm/page.h>
  10. #include <asm/cache.h>
  11. #include <asm/thread_info.h>
  12. jiffies = jiffies_64 + 4;
  13. __page_offset = 0xc0000000; /* start of area covered by struct pages */
  14. __kernel_image_start = __page_offset; /* address at which kernel image resides */
  15. SECTIONS
  16. {
  17. . = __kernel_image_start;
  18. /* discardable initialisation code and data */
  19. . = ALIGN(PAGE_SIZE); /* Init code and data */
  20. __init_begin = .;
  21. _sinittext = .;
  22. .init.text : {
  23. *(.text.head)
  24. #ifndef CONFIG_DEBUG_INFO
  25. *(.init.text)
  26. *(.exit.text)
  27. *(.exit.data)
  28. *(.exitcall.exit)
  29. #endif
  30. }
  31. _einittext = .;
  32. .init.data : { *(.init.data) }
  33. . = ALIGN(8);
  34. __setup_start = .;
  35. .setup.init : { KEEP(*(.init.setup)) }
  36. __setup_end = .;
  37. __initcall_start = .;
  38. .initcall.init : {
  39. *(.initcall1.init)
  40. *(.initcall2.init)
  41. *(.initcall3.init)
  42. *(.initcall4.init)
  43. *(.initcall5.init)
  44. *(.initcall6.init)
  45. *(.initcall7.init)
  46. }
  47. __initcall_end = .;
  48. __con_initcall_start = .;
  49. .con_initcall.init : { *(.con_initcall.init) }
  50. __con_initcall_end = .;
  51. SECURITY_INIT
  52. . = ALIGN(4);
  53. __alt_instructions = .;
  54. .altinstructions : { *(.altinstructions) }
  55. __alt_instructions_end = .;
  56. .altinstr_replacement : { *(.altinstr_replacement) }
  57. __per_cpu_start = .;
  58. .data.percpu : { *(.data.percpu) }
  59. __per_cpu_end = .;
  60. . = ALIGN(4096);
  61. __initramfs_start = .;
  62. .init.ramfs : { *(.init.ramfs) }
  63. __initramfs_end = .;
  64. . = ALIGN(THREAD_SIZE);
  65. __init_end = .;
  66. /* put sections together that have massive alignment issues */
  67. . = ALIGN(THREAD_SIZE);
  68. .data.init_task : {
  69. /* init task record & stack */
  70. *(.data.init_task)
  71. }
  72. .trap : {
  73. /* trap table management - read entry-table.S before modifying */
  74. . = ALIGN(8192);
  75. __trap_tables = .;
  76. *(.trap.user)
  77. *(.trap.kernel)
  78. . = ALIGN(4096);
  79. *(.trap.break)
  80. }
  81. . = ALIGN(4096);
  82. .data.page_aligned : { *(.data.idt) }
  83. . = ALIGN(L1_CACHE_BYTES);
  84. .data.cacheline_aligned : { *(.data.cacheline_aligned) }
  85. /* Text and read-only data */
  86. . = ALIGN(4);
  87. _text = .;
  88. _stext = .;
  89. .text : {
  90. *(
  91. .text.start .text .text.*
  92. #ifdef CONFIG_DEBUG_INFO
  93. .init.text
  94. .exit.text
  95. .exitcall.exit
  96. #endif
  97. )
  98. SCHED_TEXT
  99. LOCK_TEXT
  100. *(.fixup)
  101. *(.gnu.warning)
  102. *(.exitcall.exit)
  103. } = 0x9090
  104. _etext = .; /* End of text section */
  105. RODATA
  106. .rodata : {
  107. *(.trap.vector)
  108. /* this clause must not be modified - the ordering and adjacency are imperative */
  109. __trap_fixup_tables = .;
  110. *(.trap.fixup.user .trap.fixup.kernel)
  111. }
  112. . = ALIGN(8); /* Exception table */
  113. __start___ex_table = .;
  114. __ex_table : { KEEP(*(__ex_table)) }
  115. __stop___ex_table = .;
  116. _sdata = .;
  117. .data : { /* Data */
  118. *(.data .data.*)
  119. *(.exit.data)
  120. CONSTRUCTORS
  121. }
  122. _edata = .; /* End of data section */
  123. /* GP section */
  124. . = ALIGN(L1_CACHE_BYTES);
  125. _gp = . + 2048;
  126. PROVIDE (gp = _gp);
  127. .sdata : { *(.sdata .sdata.*) }
  128. /* BSS */
  129. . = ALIGN(L1_CACHE_BYTES);
  130. __bss_start = .;
  131. .sbss : { *(.sbss .sbss.*) }
  132. .bss : { *(.bss .bss.*) }
  133. .bss.stack : { *(.bss) }
  134. __bss_stop = .;
  135. _end = . ;
  136. . = ALIGN(PAGE_SIZE);
  137. __kernel_image_end = .;
  138. /* Stabs debugging sections. */
  139. .stab 0 : { *(.stab) }
  140. .stabstr 0 : { *(.stabstr) }
  141. .stab.excl 0 : { *(.stab.excl) }
  142. .stab.exclstr 0 : { *(.stab.exclstr) }
  143. .stab.index 0 : { *(.stab.index) }
  144. .stab.indexstr 0 : { *(.stab.indexstr) }
  145. .debug_line 0 : { *(.debug_line) }
  146. .debug_info 0 : { *(.debug_info) }
  147. .debug_abbrev 0 : { *(.debug_abbrev) }
  148. .debug_aranges 0 : { *(.debug_aranges) }
  149. .debug_frame 0 : { *(.debug_frame) }
  150. .debug_pubnames 0 : { *(.debug_pubnames) }
  151. .debug_str 0 : { *(.debug_str) }
  152. .debug_ranges 0 : { *(.debug_ranges) }
  153. .comment 0 : { *(.comment) }
  154. }
  155. __kernel_image_size_no_bss = __bss_start - __kernel_image_start;