vmlinux.lds.S 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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_BASE_ADDR;
  17. .text : {
  18. _text = . ;
  19. _stext = . ;
  20. *(.text .text.*)
  21. *(.fixup)
  22. *(.exitcall.exit)
  23. SCHED_TEXT
  24. LOCK_TEXT
  25. KPROBES_TEXT
  26. . = ALIGN (4) ;
  27. _etext = . ;
  28. }
  29. . = ALIGN (4) ;
  30. _fdt_start = . ; /* place for fdt blob */
  31. . = . + 0x4000;
  32. _fdt_end = . ;
  33. . = ALIGN(16);
  34. RODATA
  35. . = ALIGN(16);
  36. __ex_table : {
  37. __start___ex_table = .;
  38. *(__ex_table)
  39. __stop___ex_table = .;
  40. }
  41. /*
  42. * sdata2 section can go anywhere, but must be word aligned
  43. * and SDA2_BASE must point to the middle of it
  44. */
  45. .sdata2 : {
  46. _ssrw = .;
  47. . = ALIGN(4096); /* page aligned when MMU used - origin 0x8 */
  48. *(.sdata2)
  49. . = ALIGN(8);
  50. _essrw = .;
  51. _ssrw_size = _essrw - _ssrw;
  52. _KERNEL_SDA2_BASE_ = _ssrw + (_ssrw_size / 2);
  53. }
  54. _sdata = . ;
  55. .data ALIGN (4096) : { /* page aligned when MMU used - origin 0x4 */
  56. *(.data)
  57. }
  58. . = ALIGN(32);
  59. .data.cacheline_aligned : { *(.data.cacheline_aligned) }
  60. _edata = . ;
  61. /* Reserve some low RAM for r0 based memory references */
  62. . = ALIGN(0x4) ;
  63. r0_ram = . ;
  64. . = . + 4096; /* a page should be enough */
  65. /* The initial task */
  66. . = ALIGN(8192);
  67. .data.init_task : { *(.data.init_task) }
  68. /* Under the microblaze ABI, .sdata and .sbss must be contiguous */
  69. . = ALIGN(8);
  70. .sdata : {
  71. _ssro = .;
  72. *(.sdata)
  73. }
  74. .sbss : {
  75. _ssbss = .;
  76. *(.sbss)
  77. _esbss = .;
  78. _essro = .;
  79. _ssro_size = _essro - _ssro ;
  80. _KERNEL_SDA_BASE_ = _ssro + (_ssro_size / 2) ;
  81. }
  82. __init_begin = .;
  83. . = ALIGN(4096);
  84. .init.text : {
  85. _sinittext = . ;
  86. *(.init.text)
  87. *(.exit.text)
  88. *(.exit.data)
  89. _einittext = .;
  90. }
  91. .init.data : { *(.init.data) }
  92. . = ALIGN(4);
  93. .init.ivt : {
  94. __ivt_start = .;
  95. *(.init.ivt)
  96. __ivt_end = .;
  97. }
  98. .init.setup : {
  99. __setup_start = .;
  100. *(.init.setup)
  101. __setup_end = .;
  102. }
  103. .initcall.init : {
  104. __initcall_start = .;
  105. INITCALLS
  106. __initcall_end = .;
  107. }
  108. .con_initcall.init : {
  109. __con_initcall_start = .;
  110. *(.con_initcall.init)
  111. __con_initcall_end = .;
  112. }
  113. __init_end_before_initramfs = .;
  114. .init.ramfs ALIGN(4096) : {
  115. __initramfs_start = .;
  116. *(.init.ramfs)
  117. __initramfs_end = .;
  118. . = ALIGN(4);
  119. LONG(0);
  120. /*
  121. * FIXME this can break initramfs for MMU.
  122. * Pad init.ramfs up to page boundary,
  123. * so that __init_end == __bss_start. This will make image.elf
  124. * consistent with the image.bin
  125. */
  126. /* . = ALIGN(4096); */
  127. }
  128. __init_end = .;
  129. .bss ALIGN (4096) : { /* page aligned when MMU used */
  130. __bss_start = . ;
  131. *(.bss*)
  132. *(COMMON)
  133. . = ALIGN (4) ;
  134. __bss_stop = . ;
  135. _ebss = . ;
  136. }
  137. . = ALIGN(4096);
  138. _end = .;
  139. }