vmlinux.lds.S 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  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. INITCALLS
  40. }
  41. __initcall_end = .;
  42. __con_initcall_start = .;
  43. .con_initcall.init : { *(.con_initcall.init) }
  44. __con_initcall_end = .;
  45. SECURITY_INIT
  46. . = ALIGN(4);
  47. __alt_instructions = .;
  48. .altinstructions : { *(.altinstructions) }
  49. __alt_instructions_end = .;
  50. .altinstr_replacement : { *(.altinstr_replacement) }
  51. . = ALIGN(4096);
  52. __per_cpu_start = .;
  53. .data.percpu : { *(.data.percpu) }
  54. __per_cpu_end = .;
  55. #ifdef CONFIG_BLK_DEV_INITRD
  56. . = ALIGN(4096);
  57. __initramfs_start = .;
  58. .init.ramfs : { *(.init.ramfs) }
  59. __initramfs_end = .;
  60. #endif
  61. . = ALIGN(THREAD_SIZE);
  62. __init_end = .;
  63. /* put sections together that have massive alignment issues */
  64. . = ALIGN(THREAD_SIZE);
  65. .data.init_task : {
  66. /* init task record & stack */
  67. *(.data.init_task)
  68. }
  69. .trap : {
  70. /* trap table management - read entry-table.S before modifying */
  71. . = ALIGN(8192);
  72. __trap_tables = .;
  73. *(.trap.user)
  74. *(.trap.kernel)
  75. . = ALIGN(4096);
  76. *(.trap.break)
  77. }
  78. . = ALIGN(4096);
  79. .data.page_aligned : { *(.data.idt) }
  80. . = ALIGN(L1_CACHE_BYTES);
  81. .data.cacheline_aligned : { *(.data.cacheline_aligned) }
  82. /* Text and read-only data */
  83. . = ALIGN(4);
  84. _text = .;
  85. _stext = .;
  86. .text : {
  87. *(
  88. .text.start .text .text.*
  89. #ifdef CONFIG_DEBUG_INFO
  90. .init.text
  91. .exit.text
  92. .exitcall.exit
  93. #endif
  94. )
  95. SCHED_TEXT
  96. LOCK_TEXT
  97. *(.fixup)
  98. *(.gnu.warning)
  99. *(.exitcall.exit)
  100. } = 0x9090
  101. _etext = .; /* End of text section */
  102. RODATA
  103. .rodata : {
  104. *(.trap.vector)
  105. /* this clause must not be modified - the ordering and adjacency are imperative */
  106. __trap_fixup_tables = .;
  107. *(.trap.fixup.user .trap.fixup.kernel)
  108. }
  109. . = ALIGN(8); /* Exception table */
  110. __start___ex_table = .;
  111. __ex_table : { KEEP(*(__ex_table)) }
  112. __stop___ex_table = .;
  113. _sdata = .;
  114. .data : { /* Data */
  115. *(.data .data.*)
  116. *(.exit.data)
  117. CONSTRUCTORS
  118. }
  119. _edata = .; /* End of data section */
  120. /* GP section */
  121. . = ALIGN(L1_CACHE_BYTES);
  122. _gp = . + 2048;
  123. PROVIDE (gp = _gp);
  124. .sdata : { *(.sdata .sdata.*) }
  125. /* BSS */
  126. . = ALIGN(L1_CACHE_BYTES);
  127. __bss_start = .;
  128. .sbss : { *(.sbss .sbss.*) }
  129. .bss : { *(.bss .bss.*) }
  130. .bss.stack : { *(.bss) }
  131. __bss_stop = .;
  132. _end = . ;
  133. . = ALIGN(PAGE_SIZE);
  134. __kernel_image_end = .;
  135. /* Stabs debugging sections. */
  136. .stab 0 : { *(.stab) }
  137. .stabstr 0 : { *(.stabstr) }
  138. .stab.excl 0 : { *(.stab.excl) }
  139. .stab.exclstr 0 : { *(.stab.exclstr) }
  140. .stab.index 0 : { *(.stab.index) }
  141. .stab.indexstr 0 : { *(.stab.indexstr) }
  142. .debug_line 0 : { *(.debug_line) }
  143. .debug_info 0 : { *(.debug_info) }
  144. .debug_abbrev 0 : { *(.debug_abbrev) }
  145. .debug_aranges 0 : { *(.debug_aranges) }
  146. .debug_frame 0 : { *(.debug_frame) }
  147. .debug_pubnames 0 : { *(.debug_pubnames) }
  148. .debug_str 0 : { *(.debug_str) }
  149. .debug_ranges 0 : { *(.debug_ranges) }
  150. .comment 0 : { *(.comment) }
  151. }
  152. __kernel_image_size_no_bss = __bss_start - __kernel_image_start;