vmlinux.lds.S 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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_ARCH(microblaze)
  11. ENTRY(microblaze_start)
  12. #include <asm/page.h>
  13. #include <asm-generic/vmlinux.lds.h>
  14. #include <asm/thread_info.h>
  15. #ifdef __MICROBLAZEEL__
  16. jiffies = jiffies_64;
  17. #else
  18. jiffies = jiffies_64 + 4;
  19. #endif
  20. SECTIONS {
  21. . = CONFIG_KERNEL_START;
  22. microblaze_start = CONFIG_KERNEL_BASE_ADDR;
  23. .text : AT(ADDR(.text) - LOAD_OFFSET) {
  24. _text = . ;
  25. _stext = . ;
  26. HEAD_TEXT
  27. TEXT_TEXT
  28. *(.fixup)
  29. EXIT_TEXT
  30. EXIT_CALL
  31. SCHED_TEXT
  32. CPUIDLE_TEXT
  33. LOCK_TEXT
  34. KPROBES_TEXT
  35. IRQENTRY_TEXT
  36. SOFTIRQENTRY_TEXT
  37. . = ALIGN (4) ;
  38. _etext = . ;
  39. }
  40. . = ALIGN (4) ;
  41. __fdt_blob : AT(ADDR(__fdt_blob) - LOAD_OFFSET) {
  42. _fdt_start = . ; /* place for fdt blob */
  43. *(__fdt_blob) ; /* Any link-placed DTB */
  44. . = _fdt_start + 0x8000; /* Pad up to 32kbyte */
  45. _fdt_end = . ;
  46. }
  47. . = ALIGN(16);
  48. RODATA
  49. EXCEPTION_TABLE(16)
  50. NOTES
  51. /*
  52. * sdata2 section can go anywhere, but must be word aligned
  53. * and SDA2_BASE must point to the middle of it
  54. */
  55. .sdata2 : AT(ADDR(.sdata2) - LOAD_OFFSET) {
  56. _ssrw = .;
  57. . = ALIGN(PAGE_SIZE); /* page aligned when MMU used */
  58. *(.sdata2)
  59. . = ALIGN(8);
  60. _essrw = .;
  61. _ssrw_size = _essrw - _ssrw;
  62. _KERNEL_SDA2_BASE_ = _ssrw + (_ssrw_size / 2);
  63. }
  64. _sdata = . ;
  65. RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE)
  66. _edata = . ;
  67. /* Under the microblaze ABI, .sdata and .sbss must be contiguous */
  68. . = ALIGN(8);
  69. .sdata : AT(ADDR(.sdata) - LOAD_OFFSET) {
  70. _ssro = .;
  71. *(.sdata)
  72. }
  73. .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) {
  74. _ssbss = .;
  75. *(.sbss)
  76. _esbss = .;
  77. _essro = .;
  78. _ssro_size = _essro - _ssro ;
  79. _KERNEL_SDA_BASE_ = _ssro + (_ssro_size / 2) ;
  80. }
  81. . = ALIGN(PAGE_SIZE);
  82. __init_begin = .;
  83. INIT_TEXT_SECTION(PAGE_SIZE)
  84. .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) {
  85. INIT_DATA
  86. }
  87. . = ALIGN(4);
  88. .init.ivt : AT(ADDR(.init.ivt) - LOAD_OFFSET) {
  89. __ivt_start = .;
  90. *(.init.ivt)
  91. __ivt_end = .;
  92. }
  93. .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) {
  94. INIT_SETUP(0)
  95. }
  96. .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET ) {
  97. INIT_CALLS
  98. }
  99. .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
  100. CON_INITCALL
  101. }
  102. SECURITY_INIT
  103. __init_end_before_initramfs = .;
  104. .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
  105. INIT_RAM_FS
  106. }
  107. __init_end = .;
  108. .bss ALIGN (PAGE_SIZE) : AT(ADDR(.bss) - LOAD_OFFSET) {
  109. /* page aligned when MMU used */
  110. __bss_start = . ;
  111. *(.bss*)
  112. *(COMMON)
  113. . = ALIGN (4) ;
  114. __bss_stop = . ;
  115. }
  116. . = ALIGN(PAGE_SIZE);
  117. _end = .;
  118. DISCARDS
  119. }