vmlinux.lds.S 3.7 KB

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