vmlinux.lds.S 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. #define VMLINUX_SYMBOL(_sym_) _##_sym_
  2. #include <asm-generic/vmlinux.lds.h>
  3. /* target memory map */
  4. #ifdef CONFIG_H8300H_GENERIC
  5. #define ROMTOP 0x000000
  6. #define ROMSIZE 0x400000
  7. #define RAMTOP 0x400000
  8. #define RAMSIZE 0x400000
  9. #endif
  10. #ifdef CONFIG_H8300H_AKI3068NET
  11. #define ROMTOP 0x000000
  12. #define ROMSIZE 0x080000
  13. #define RAMTOP 0x400000
  14. #define RAMSIZE 0x200000
  15. #endif
  16. #ifdef CONFIG_H8300H_H8MAX
  17. #define ROMTOP 0x000000
  18. #define ROMSIZE 0x080000
  19. #define RAMTOP 0x400000
  20. #define RAMSIZE 0x200000
  21. #endif
  22. #ifdef CONFIG_H8300H_SIM
  23. #define ROMTOP 0x000000
  24. #define ROMSIZE 0x400000
  25. #define RAMTOP 0x400000
  26. #define RAMSIZE 0x400000
  27. #endif
  28. #ifdef CONFIG_H8S_SIM
  29. #define ROMTOP 0x000000
  30. #define ROMSIZE 0x400000
  31. #define RAMTOP 0x400000
  32. #define RAMSIZE 0x800000
  33. #endif
  34. #ifdef CONFIG_H8S_EDOSK2674
  35. #define ROMTOP 0x000000
  36. #define ROMSIZE 0x400000
  37. #define RAMTOP 0x400000
  38. #define RAMSIZE 0x800000
  39. #endif
  40. #if defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM)
  41. INPUT(romfs.o)
  42. #endif
  43. _jiffies = _jiffies_64 + 4;
  44. ENTRY(__start)
  45. SECTIONS
  46. {
  47. #if defined(CONFIG_ROMKERNEL)
  48. . = ROMTOP;
  49. .vectors :
  50. {
  51. __vector = . ;
  52. *(.vectors*)
  53. }
  54. #else
  55. . = RAMTOP;
  56. .bootvec :
  57. {
  58. *(.bootvec)
  59. }
  60. #endif
  61. .text :
  62. {
  63. _text = .;
  64. #if defined(CONFIG_ROMKERNEL)
  65. *(.int_redirect)
  66. #endif
  67. __stext = . ;
  68. *(.text)
  69. SCHED_TEXT
  70. LOCK_TEXT
  71. __etext = . ;
  72. . = ALIGN(16); /* Exception table */
  73. ___start___ex_table = .;
  74. *(__ex_table)
  75. ___stop___ex_table = .;
  76. }
  77. RODATA
  78. #if defined(CONFIG_ROMKERNEL)
  79. SECURITY_INIT
  80. #endif
  81. ROEND = .;
  82. #if defined(CONFIG_ROMKERNEL)
  83. . = RAMTOP;
  84. .data : AT(ROEND)
  85. #else
  86. .data :
  87. #endif
  88. {
  89. __sdata = . ;
  90. ___data_start = . ;
  91. . = ALIGN(0x2000) ;
  92. *(.data.init_task)
  93. . = ALIGN(0x4) ;
  94. *(.data)
  95. . = ALIGN(0x4) ;
  96. *(.data.*)
  97. . = ALIGN(0x4) ;
  98. ___init_begin = .;
  99. __sinittext = .;
  100. *(.init.text)
  101. __einittext = .;
  102. *(.init.data)
  103. . = ALIGN(0x4) ;
  104. ___setup_start = .;
  105. *(.init.setup)
  106. . = ALIGN(0x4) ;
  107. ___setup_end = .;
  108. ___initcall_start = .;
  109. INITCALLS
  110. ___initcall_end = .;
  111. ___con_initcall_start = .;
  112. *(.con_initcall.init)
  113. ___con_initcall_end = .;
  114. *(.exit.text)
  115. *(.exit.data)
  116. . = ALIGN(4);
  117. ___initramfs_start = .;
  118. *(.init.ramfs)
  119. ___initramfs_end = .;
  120. . = ALIGN(0x4) ;
  121. ___init_end = .;
  122. __edata = . ;
  123. }
  124. #if defined(CONFIG_RAMKERNEL)
  125. SECURITY_INIT
  126. #endif
  127. __begin_data = LOADADDR(.data);
  128. .bss :
  129. {
  130. . = ALIGN(0x4) ;
  131. __sbss = . ;
  132. *(.bss*)
  133. . = ALIGN(0x4) ;
  134. *(COMMON)
  135. . = ALIGN(0x4) ;
  136. __ebss = . ;
  137. __end = . ;
  138. __ramstart = .;
  139. }
  140. /DISCARD/ : {
  141. *(.exitcall.exit)
  142. }
  143. .romfs :
  144. {
  145. *(.romfs*)
  146. }
  147. . = RAMTOP+RAMSIZE;
  148. .dummy :
  149. {
  150. COMMAND_START = . - 0x200 ;
  151. __ramend = . ;
  152. }
  153. }