vmlinux.lds.S 4.0 KB

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