vmlinux.lds.S 3.6 KB

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