vmlinux.lds_no.S 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  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 equipped to build either ROM loaded or RAM
  7. * run kernels.
  8. */
  9. #include <asm-generic/vmlinux.lds.h>
  10. #include <asm/page.h>
  11. #include <asm/thread_info.h>
  12. #if defined(CONFIG_RAMKERNEL)
  13. #define RAM_START CONFIG_KERNELBASE
  14. #define RAM_LENGTH (CONFIG_RAMBASE + CONFIG_RAMSIZE - CONFIG_KERNELBASE)
  15. #define TEXT ram
  16. #define DATA ram
  17. #define INIT ram
  18. #define BSSS ram
  19. #endif
  20. #if defined(CONFIG_ROMKERNEL) || defined(CONFIG_HIMEMKERNEL)
  21. #define RAM_START CONFIG_RAMBASE
  22. #define RAM_LENGTH CONFIG_RAMSIZE
  23. #define ROMVEC_START CONFIG_ROMVEC
  24. #define ROMVEC_LENGTH CONFIG_ROMVECSIZE
  25. #define ROM_START CONFIG_ROMSTART
  26. #define ROM_LENGTH CONFIG_ROMSIZE
  27. #define TEXT rom
  28. #define DATA ram
  29. #define INIT ram
  30. #define BSSS ram
  31. #endif
  32. #ifndef DATA_ADDR
  33. #define DATA_ADDR
  34. #endif
  35. OUTPUT_ARCH(m68k)
  36. ENTRY(_start)
  37. MEMORY {
  38. ram : ORIGIN = RAM_START, LENGTH = RAM_LENGTH
  39. #ifdef ROM_START
  40. romvec : ORIGIN = ROMVEC_START, LENGTH = ROMVEC_LENGTH
  41. rom : ORIGIN = ROM_START, LENGTH = ROM_LENGTH
  42. #endif
  43. }
  44. jiffies = jiffies_64 + 4;
  45. SECTIONS {
  46. #ifdef ROMVEC_START
  47. . = ROMVEC_START ;
  48. .romvec : {
  49. __rom_start = . ;
  50. _romvec = .;
  51. *(.data..initvect)
  52. } > romvec
  53. #endif
  54. .text : {
  55. _text = .;
  56. _stext = . ;
  57. HEAD_TEXT
  58. TEXT_TEXT
  59. SCHED_TEXT
  60. LOCK_TEXT
  61. *(.text..lock)
  62. . = ALIGN(16); /* Exception table */
  63. __start___ex_table = .;
  64. *(__ex_table)
  65. __stop___ex_table = .;
  66. *(.rodata) *(.rodata.*)
  67. *(__vermagic) /* Kernel version magic */
  68. *(.rodata1)
  69. *(.rodata.str1.1)
  70. /* Kernel symbol table: Normal symbols */
  71. . = ALIGN(4);
  72. __start___ksymtab = .;
  73. *(SORT(___ksymtab+*))
  74. __stop___ksymtab = .;
  75. /* Kernel symbol table: GPL-only symbols */
  76. __start___ksymtab_gpl = .;
  77. *(SORT(___ksymtab_gpl+*))
  78. __stop___ksymtab_gpl = .;
  79. /* Kernel symbol table: Normal unused symbols */
  80. __start___ksymtab_unused = .;
  81. *(SORT(___ksymtab_unused+*))
  82. __stop___ksymtab_unused = .;
  83. /* Kernel symbol table: GPL-only unused symbols */
  84. __start___ksymtab_unused_gpl = .;
  85. *(SORT(___ksymtab_unused_gpl+*))
  86. __stop___ksymtab_unused_gpl = .;
  87. /* Kernel symbol table: GPL-future symbols */
  88. __start___ksymtab_gpl_future = .;
  89. *(SORT(___ksymtab_gpl_future+*))
  90. __stop___ksymtab_gpl_future = .;
  91. /* Kernel symbol table: Normal symbols */
  92. __start___kcrctab = .;
  93. *(SORT(___kcrctab+*))
  94. __stop___kcrctab = .;
  95. /* Kernel symbol table: GPL-only symbols */
  96. __start___kcrctab_gpl = .;
  97. *(SORT(___kcrctab_gpl+*))
  98. __stop___kcrctab_gpl = .;
  99. /* Kernel symbol table: Normal unused symbols */
  100. __start___kcrctab_unused = .;
  101. *(SORT(___kcrctab_unused+*))
  102. __stop___kcrctab_unused = .;
  103. /* Kernel symbol table: GPL-only unused symbols */
  104. __start___kcrctab_unused_gpl = .;
  105. *(SORT(___kcrctab_unused_gpl+*))
  106. __stop___kcrctab_unused_gpl = .;
  107. /* Kernel symbol table: GPL-future symbols */
  108. __start___kcrctab_gpl_future = .;
  109. *(SORT(___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. /* Built-in module versions */
  119. . = ALIGN(4) ;
  120. __start___modver = .;
  121. *(__modver)
  122. __stop___modver = .;
  123. . = ALIGN(4) ;
  124. _etext = . ;
  125. } > TEXT
  126. .data DATA_ADDR : {
  127. . = ALIGN(4);
  128. _sdata = . ;
  129. DATA_DATA
  130. CACHELINE_ALIGNED_DATA(32)
  131. PAGE_ALIGNED_DATA(PAGE_SIZE)
  132. *(.data..shared_aligned)
  133. INIT_TASK_DATA(THREAD_SIZE)
  134. _edata = . ;
  135. } > DATA
  136. .init.text : {
  137. . = ALIGN(PAGE_SIZE);
  138. __init_begin = .;
  139. } > INIT
  140. INIT_TEXT_SECTION(PAGE_SIZE) > INIT
  141. INIT_DATA_SECTION(16) > INIT
  142. .init.data : {
  143. . = ALIGN(PAGE_SIZE);
  144. __init_end = .;
  145. } > INIT
  146. .bss : {
  147. . = ALIGN(4);
  148. _sbss = . ;
  149. *(.bss)
  150. *(COMMON)
  151. . = ALIGN(4) ;
  152. _ebss = . ;
  153. _end = . ;
  154. } > BSSS
  155. DISCARDS
  156. }