vmlinux.lds.S 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  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. *(.fixup)
  100. *(.gnu.warning)
  101. *(.exitcall.exit)
  102. } = 0x9090
  103. _etext = .; /* End of text section */
  104. RODATA
  105. .rodata : {
  106. *(.trap.vector)
  107. /* this clause must not be modified - the ordering and adjacency are imperative */
  108. __trap_fixup_tables = .;
  109. *(.trap.fixup.user .trap.fixup.kernel)
  110. }
  111. . = ALIGN(8); /* Exception table */
  112. __start___ex_table = .;
  113. __ex_table : { KEEP(*(__ex_table)) }
  114. __stop___ex_table = .;
  115. _sdata = .;
  116. .data : { /* Data */
  117. *(.data .data.*)
  118. *(.exit.data)
  119. CONSTRUCTORS
  120. }
  121. _edata = .; /* End of data section */
  122. /* GP section */
  123. . = ALIGN(L1_CACHE_BYTES);
  124. _gp = . + 2048;
  125. PROVIDE (gp = _gp);
  126. .sdata : { *(.sdata .sdata.*) }
  127. /* BSS */
  128. . = ALIGN(L1_CACHE_BYTES);
  129. __bss_start = .;
  130. .sbss : { *(.sbss .sbss.*) }
  131. .bss : { *(.bss .bss.*) }
  132. .bss.stack : { *(.bss) }
  133. __bss_stop = .;
  134. _end = . ;
  135. . = ALIGN(PAGE_SIZE);
  136. __kernel_image_end = .;
  137. /* Stabs debugging sections. */
  138. .stab 0 : { *(.stab) }
  139. .stabstr 0 : { *(.stabstr) }
  140. .stab.excl 0 : { *(.stab.excl) }
  141. .stab.exclstr 0 : { *(.stab.exclstr) }
  142. .stab.index 0 : { *(.stab.index) }
  143. .stab.indexstr 0 : { *(.stab.indexstr) }
  144. .debug_line 0 : { *(.debug_line) }
  145. .debug_info 0 : { *(.debug_info) }
  146. .debug_abbrev 0 : { *(.debug_abbrev) }
  147. .debug_aranges 0 : { *(.debug_aranges) }
  148. .debug_frame 0 : { *(.debug_frame) }
  149. .debug_pubnames 0 : { *(.debug_pubnames) }
  150. .debug_str 0 : { *(.debug_str) }
  151. .debug_ranges 0 : { *(.debug_ranges) }
  152. .comment 0 : { *(.comment) }
  153. }
  154. __kernel_image_size_no_bss = __bss_start - __kernel_image_start;