vmlinux.lds.S 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. /*
  2. * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu>
  3. * Copyright (C) 2008-2009 PetaLogix
  4. * Copyright (C) 2006 Atmark Techno, Inc.
  5. *
  6. * This file is subject to the terms and conditions of the GNU General Public
  7. * License. See the file "COPYING" in the main directory of this archive
  8. * for more details.
  9. */
  10. OUTPUT_FORMAT("elf32-microblaze", "elf32-microblaze", "elf32-microblaze")
  11. OUTPUT_ARCH(microblaze)
  12. ENTRY(_start)
  13. #include <asm-generic/vmlinux.lds.h>
  14. jiffies = jiffies_64 + 4;
  15. SECTIONS {
  16. . = CONFIG_KERNEL_START;
  17. .text : {
  18. _text = . ;
  19. _stext = . ;
  20. *(.text .text.*)
  21. *(.fixup)
  22. EXIT_TEXT
  23. EXIT_CALL
  24. SCHED_TEXT
  25. LOCK_TEXT
  26. KPROBES_TEXT
  27. . = ALIGN (4) ;
  28. _etext = . ;
  29. }
  30. . = ALIGN (4) ;
  31. _fdt_start = . ; /* place for fdt blob */
  32. . = . + 0x4000;
  33. _fdt_end = . ;
  34. . = ALIGN(16);
  35. RODATA
  36. . = ALIGN(16);
  37. __ex_table : {
  38. __start___ex_table = .;
  39. *(__ex_table)
  40. __stop___ex_table = .;
  41. }
  42. /*
  43. * sdata2 section can go anywhere, but must be word aligned
  44. * and SDA2_BASE must point to the middle of it
  45. */
  46. .sdata2 : {
  47. _ssrw = .;
  48. . = ALIGN(4096); /* page aligned when MMU used - origin 0x8 */
  49. *(.sdata2)
  50. . = ALIGN(8);
  51. _essrw = .;
  52. _ssrw_size = _essrw - _ssrw;
  53. _KERNEL_SDA2_BASE_ = _ssrw + (_ssrw_size / 2);
  54. }
  55. _sdata = . ;
  56. .data ALIGN (4096) : { /* page aligned when MMU used - origin 0x4 */
  57. DATA_DATA
  58. CONSTRUCTORS
  59. }
  60. . = ALIGN(32);
  61. .data.cacheline_aligned : { *(.data.cacheline_aligned) }
  62. _edata = . ;
  63. /* Reserve some low RAM for r0 based memory references */
  64. . = ALIGN(0x4) ;
  65. r0_ram = . ;
  66. . = . + 4096; /* a page should be enough */
  67. /* The initial task */
  68. . = ALIGN(8192);
  69. .data.init_task : { *(.data.init_task) }
  70. /* Under the microblaze ABI, .sdata and .sbss must be contiguous */
  71. . = ALIGN(8);
  72. .sdata : {
  73. _ssro = .;
  74. *(.sdata)
  75. }
  76. .sbss : {
  77. _ssbss = .;
  78. *(.sbss)
  79. _esbss = .;
  80. _essro = .;
  81. _ssro_size = _essro - _ssro ;
  82. _KERNEL_SDA_BASE_ = _ssro + (_ssro_size / 2) ;
  83. }
  84. __init_begin = .;
  85. . = ALIGN(4096);
  86. .init.text : {
  87. _sinittext = . ;
  88. INIT_TEXT
  89. _einittext = .;
  90. }
  91. .init.data : {
  92. INIT_DATA
  93. }
  94. . = ALIGN(4);
  95. .init.ivt : {
  96. __ivt_start = .;
  97. *(.init.ivt)
  98. __ivt_end = .;
  99. }
  100. .init.setup : {
  101. __setup_start = .;
  102. *(.init.setup)
  103. __setup_end = .;
  104. }
  105. .initcall.init : {
  106. __initcall_start = .;
  107. INITCALLS
  108. __initcall_end = .;
  109. }
  110. .con_initcall.init : {
  111. __con_initcall_start = .;
  112. *(.con_initcall.init)
  113. __con_initcall_end = .;
  114. }
  115. SECURITY_INIT
  116. __init_end_before_initramfs = .;
  117. .init.ramfs ALIGN(4096) : {
  118. __initramfs_start = .;
  119. *(.init.ramfs)
  120. __initramfs_end = .;
  121. . = ALIGN(4);
  122. LONG(0);
  123. /*
  124. * FIXME this can break initramfs for MMU.
  125. * Pad init.ramfs up to page boundary,
  126. * so that __init_end == __bss_start. This will make image.elf
  127. * consistent with the image.bin
  128. */
  129. /* . = ALIGN(4096); */
  130. }
  131. __init_end = .;
  132. .bss ALIGN (4096) : { /* page aligned when MMU used */
  133. __bss_start = . ;
  134. *(.bss*)
  135. *(COMMON)
  136. . = ALIGN (4) ;
  137. __bss_stop = . ;
  138. _ebss = . ;
  139. }
  140. . = ALIGN(4096);
  141. _end = .;
  142. DISCARDS
  143. }