vmlinux.lds.S 3.8 KB

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