vmlinux.lds.S 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. /*
  2. * vmlinux.lds.S -- master linker script for m68knommu arch
  3. *
  4. * (C) Copyright 2002-2006, Greg Ungerer <gerg@snapgear.com>
  5. *
  6. * This linker script is equiped to build either ROM loaded or RAM
  7. * run kernels.
  8. */
  9. #include <asm-generic/vmlinux.lds.h>
  10. #if defined(CONFIG_RAMKERNEL)
  11. #define RAM_START CONFIG_KERNELBASE
  12. #define RAM_LENGTH (CONFIG_RAMBASE + CONFIG_RAMSIZE - CONFIG_KERNELBASE)
  13. #define TEXT ram
  14. #define DATA ram
  15. #define INIT ram
  16. #define BSS ram
  17. #endif
  18. #if defined(CONFIG_ROMKERNEL) || defined(CONFIG_HIMEMKERNEL)
  19. #define RAM_START CONFIG_RAMBASE
  20. #define RAM_LENGTH CONFIG_RAMSIZE
  21. #define ROMVEC_START CONFIG_ROMVEC
  22. #define ROMVEC_LENGTH CONFIG_ROMVECSIZE
  23. #define ROM_START CONFIG_ROMSTART
  24. #define ROM_LENGTH CONFIG_ROMSIZE
  25. #define TEXT rom
  26. #define DATA ram
  27. #define INIT ram
  28. #define BSS ram
  29. #endif
  30. #ifndef DATA_ADDR
  31. #define DATA_ADDR
  32. #endif
  33. OUTPUT_ARCH(m68k)
  34. ENTRY(_start)
  35. MEMORY {
  36. ram : ORIGIN = RAM_START, LENGTH = RAM_LENGTH
  37. #ifdef ROM_START
  38. romvec : ORIGIN = ROMVEC_START, LENGTH = ROMVEC_LENGTH
  39. rom : ORIGIN = ROM_START, LENGTH = ROM_LENGTH
  40. #endif
  41. }
  42. jiffies = jiffies_64 + 4;
  43. SECTIONS {
  44. #ifdef ROMVEC_START
  45. . = ROMVEC_START ;
  46. .romvec : {
  47. __rom_start = . ;
  48. _romvec = .;
  49. *(.data.initvect)
  50. } > romvec
  51. #endif
  52. .text : {
  53. _text = .;
  54. _stext = . ;
  55. HEAD_TEXT
  56. TEXT_TEXT
  57. SCHED_TEXT
  58. LOCK_TEXT
  59. *(.text.lock)
  60. . = ALIGN(16); /* Exception table */
  61. __start___ex_table = .;
  62. *(__ex_table)
  63. __stop___ex_table = .;
  64. *(.rodata) *(.rodata.*)
  65. *(__vermagic) /* Kernel version magic */
  66. *(__markers_strings)
  67. *(.rodata1)
  68. *(.rodata.str1.1)
  69. /* Kernel symbol table: Normal symbols */
  70. . = ALIGN(4);
  71. __start___ksymtab = .;
  72. *(__ksymtab)
  73. __stop___ksymtab = .;
  74. /* Kernel symbol table: GPL-only symbols */
  75. __start___ksymtab_gpl = .;
  76. *(__ksymtab_gpl)
  77. __stop___ksymtab_gpl = .;
  78. /* Kernel symbol table: Normal unused symbols */
  79. __start___ksymtab_unused = .;
  80. *(__ksymtab_unused)
  81. __stop___ksymtab_unused = .;
  82. /* Kernel symbol table: GPL-only unused symbols */
  83. __start___ksymtab_unused_gpl = .;
  84. *(__ksymtab_unused_gpl)
  85. __stop___ksymtab_unused_gpl = .;
  86. /* Kernel symbol table: GPL-future symbols */
  87. __start___ksymtab_gpl_future = .;
  88. *(__ksymtab_gpl_future)
  89. __stop___ksymtab_gpl_future = .;
  90. /* Kernel symbol table: Normal symbols */
  91. __start___kcrctab = .;
  92. *(__kcrctab)
  93. __stop___kcrctab = .;
  94. /* Kernel symbol table: GPL-only symbols */
  95. __start___kcrctab_gpl = .;
  96. *(__kcrctab_gpl)
  97. __stop___kcrctab_gpl = .;
  98. /* Kernel symbol table: Normal unused symbols */
  99. __start___kcrctab_unused = .;
  100. *(__kcrctab_unused)
  101. __stop___kcrctab_unused = .;
  102. /* Kernel symbol table: GPL-only unused symbols */
  103. __start___kcrctab_unused_gpl = .;
  104. *(__kcrctab_unused_gpl)
  105. __stop___kcrctab_unused_gpl = .;
  106. /* Kernel symbol table: GPL-future symbols */
  107. __start___kcrctab_gpl_future = .;
  108. *(__kcrctab_gpl_future)
  109. __stop___kcrctab_gpl_future = .;
  110. /* Kernel symbol table: strings */
  111. *(__ksymtab_strings)
  112. /* Built-in module parameters */
  113. . = ALIGN(4) ;
  114. __start___param = .;
  115. *(__param)
  116. __stop___param = .;
  117. . = ALIGN(4) ;
  118. _etext = . ;
  119. } > TEXT
  120. .data DATA_ADDR : {
  121. . = ALIGN(4);
  122. _sdata = . ;
  123. DATA_DATA
  124. . = ALIGN(32);
  125. *(.data.cacheline_aligned)
  126. . = ALIGN(8192) ;
  127. *(.data.init_task)
  128. _edata = . ;
  129. } > DATA
  130. .init : {
  131. . = ALIGN(4096);
  132. __init_begin = .;
  133. _sinittext = .;
  134. INIT_TEXT
  135. _einittext = .;
  136. INIT_DATA
  137. . = ALIGN(16);
  138. __setup_start = .;
  139. *(.init.setup)
  140. __setup_end = .;
  141. __initcall_start = .;
  142. INITCALLS
  143. __initcall_end = .;
  144. __con_initcall_start = .;
  145. *(.con_initcall.init)
  146. __con_initcall_end = .;
  147. __security_initcall_start = .;
  148. *(.security_initcall.init)
  149. __security_initcall_end = .;
  150. #ifdef CONFIG_BLK_DEV_INITRD
  151. . = ALIGN(4);
  152. __initramfs_start = .;
  153. *(.init.ramfs)
  154. __initramfs_end = .;
  155. #endif
  156. . = ALIGN(4096);
  157. __init_end = .;
  158. } > INIT
  159. .bss : {
  160. . = ALIGN(4);
  161. _sbss = . ;
  162. *(.bss)
  163. *(COMMON)
  164. . = ALIGN(4) ;
  165. _ebss = . ;
  166. _end = . ;
  167. } > BSS
  168. DISCARDS
  169. }