vmlinux.lds.S 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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. LOCK_TEXT
  33. KPROBES_TEXT
  34. IRQENTRY_TEXT
  35. . = ALIGN (4) ;
  36. _etext = . ;
  37. }
  38. . = ALIGN (4) ;
  39. __fdt_blob : AT(ADDR(__fdt_blob) - LOAD_OFFSET) {
  40. _fdt_start = . ; /* place for fdt blob */
  41. *(__fdt_blob) ; /* Any link-placed DTB */
  42. . = _fdt_start + 0x4000; /* Pad up to 16kbyte */
  43. _fdt_end = . ;
  44. }
  45. . = ALIGN(16);
  46. RODATA
  47. EXCEPTION_TABLE(16)
  48. /*
  49. * sdata2 section can go anywhere, but must be word aligned
  50. * and SDA2_BASE must point to the middle of it
  51. */
  52. .sdata2 : AT(ADDR(.sdata2) - LOAD_OFFSET) {
  53. _ssrw = .;
  54. . = ALIGN(PAGE_SIZE); /* page aligned when MMU used */
  55. *(.sdata2)
  56. . = ALIGN(8);
  57. _essrw = .;
  58. _ssrw_size = _essrw - _ssrw;
  59. _KERNEL_SDA2_BASE_ = _ssrw + (_ssrw_size / 2);
  60. }
  61. _sdata = . ;
  62. RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE)
  63. _edata = . ;
  64. /* Under the microblaze ABI, .sdata and .sbss must be contiguous */
  65. . = ALIGN(8);
  66. .sdata : AT(ADDR(.sdata) - LOAD_OFFSET) {
  67. _ssro = .;
  68. *(.sdata)
  69. }
  70. .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) {
  71. _ssbss = .;
  72. *(.sbss)
  73. _esbss = .;
  74. _essro = .;
  75. _ssro_size = _essro - _ssro ;
  76. _KERNEL_SDA_BASE_ = _ssro + (_ssro_size / 2) ;
  77. }
  78. . = ALIGN(PAGE_SIZE);
  79. __init_begin = .;
  80. INIT_TEXT_SECTION(PAGE_SIZE)
  81. .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) {
  82. INIT_DATA
  83. }
  84. . = ALIGN(4);
  85. .init.ivt : AT(ADDR(.init.ivt) - LOAD_OFFSET) {
  86. __ivt_start = .;
  87. *(.init.ivt)
  88. __ivt_end = .;
  89. }
  90. .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) {
  91. INIT_SETUP(0)
  92. }
  93. .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET ) {
  94. INIT_CALLS
  95. }
  96. .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
  97. CON_INITCALL
  98. }
  99. SECURITY_INIT
  100. __init_end_before_initramfs = .;
  101. .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
  102. INIT_RAM_FS
  103. }
  104. __init_end = .;
  105. .bss ALIGN (PAGE_SIZE) : AT(ADDR(.bss) - LOAD_OFFSET) {
  106. /* page aligned when MMU used */
  107. __bss_start = . ;
  108. *(.bss*)
  109. *(COMMON)
  110. . = ALIGN (4) ;
  111. __bss_stop = . ;
  112. _ebss = . ;
  113. }
  114. . = ALIGN(PAGE_SIZE);
  115. _end = .;
  116. DISCARDS
  117. }