vmlinux.lds.S 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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. TEXT_TEXT
  56. SCHED_TEXT
  57. LOCK_TEXT
  58. *(.text.lock)
  59. . = ALIGN(16); /* Exception table */
  60. __start___ex_table = .;
  61. *(__ex_table)
  62. __stop___ex_table = .;
  63. *(.rodata) *(.rodata.*)
  64. *(__vermagic) /* Kernel version magic */
  65. *(__markers_strings)
  66. *(.rodata1)
  67. *(.rodata.str1.1)
  68. /* Kernel symbol table: Normal symbols */
  69. . = ALIGN(4);
  70. __start___ksymtab = .;
  71. *(__ksymtab)
  72. __stop___ksymtab = .;
  73. /* Kernel symbol table: GPL-only symbols */
  74. __start___ksymtab_gpl = .;
  75. *(__ksymtab_gpl)
  76. __stop___ksymtab_gpl = .;
  77. /* Kernel symbol table: Normal unused symbols */
  78. __start___ksymtab_unused = .;
  79. *(__ksymtab_unused)
  80. __stop___ksymtab_unused = .;
  81. /* Kernel symbol table: GPL-only unused symbols */
  82. __start___ksymtab_unused_gpl = .;
  83. *(__ksymtab_unused_gpl)
  84. __stop___ksymtab_unused_gpl = .;
  85. /* Kernel symbol table: GPL-future symbols */
  86. __start___ksymtab_gpl_future = .;
  87. *(__ksymtab_gpl_future)
  88. __stop___ksymtab_gpl_future = .;
  89. /* Kernel symbol table: Normal symbols */
  90. __start___kcrctab = .;
  91. *(__kcrctab)
  92. __stop___kcrctab = .;
  93. /* Kernel symbol table: GPL-only symbols */
  94. __start___kcrctab_gpl = .;
  95. *(__kcrctab_gpl)
  96. __stop___kcrctab_gpl = .;
  97. /* Kernel symbol table: Normal unused symbols */
  98. __start___kcrctab_unused = .;
  99. *(__kcrctab_unused)
  100. __stop___kcrctab_unused = .;
  101. /* Kernel symbol table: GPL-only unused symbols */
  102. __start___kcrctab_unused_gpl = .;
  103. *(__kcrctab_unused_gpl)
  104. __stop___kcrctab_unused_gpl = .;
  105. /* Kernel symbol table: GPL-future symbols */
  106. __start___kcrctab_gpl_future = .;
  107. *(__kcrctab_gpl_future)
  108. __stop___kcrctab_gpl_future = .;
  109. /* Kernel symbol table: strings */
  110. *(__ksymtab_strings)
  111. /* Built-in module parameters */
  112. . = ALIGN(4) ;
  113. __start___param = .;
  114. *(__param)
  115. __stop___param = .;
  116. . = ALIGN(4) ;
  117. _etext = . ;
  118. } > TEXT
  119. .data DATA_ADDR : {
  120. . = ALIGN(4);
  121. _sdata = . ;
  122. DATA_DATA
  123. . = ALIGN(8192) ;
  124. *(.data.init_task)
  125. _edata = . ;
  126. } > DATA
  127. .init : {
  128. . = ALIGN(4096);
  129. __init_begin = .;
  130. _sinittext = .;
  131. INIT_TEXT
  132. _einittext = .;
  133. INIT_DATA
  134. . = ALIGN(16);
  135. __setup_start = .;
  136. *(.init.setup)
  137. __setup_end = .;
  138. __initcall_start = .;
  139. INITCALLS
  140. __initcall_end = .;
  141. __con_initcall_start = .;
  142. *(.con_initcall.init)
  143. __con_initcall_end = .;
  144. __security_initcall_start = .;
  145. *(.security_initcall.init)
  146. __security_initcall_end = .;
  147. #ifdef CONFIG_BLK_DEV_INITRD
  148. . = ALIGN(4);
  149. __initramfs_start = .;
  150. *(.init.ramfs)
  151. __initramfs_end = .;
  152. #endif
  153. . = ALIGN(4096);
  154. __init_end = .;
  155. } > INIT
  156. /DISCARD/ : {
  157. EXIT_TEXT
  158. EXIT_DATA
  159. *(.exitcall.exit)
  160. }
  161. .bss : {
  162. . = ALIGN(4);
  163. _sbss = . ;
  164. *(.bss)
  165. *(COMMON)
  166. . = ALIGN(4) ;
  167. _ebss = . ;
  168. _end = . ;
  169. } > BSS
  170. }