vmlinux.lds.S 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. /* ld script to make FRV Linux kernel
  2. * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
  3. */
  4. OUTPUT_FORMAT("elf32-frv", "elf32-frv", "elf32-frv")
  5. OUTPUT_ARCH(frv)
  6. ENTRY(_start)
  7. #include <asm-generic/vmlinux.lds.h>
  8. #include <asm/processor.h>
  9. #include <asm/page.h>
  10. #include <asm/cache.h>
  11. #include <asm/thread_info.h>
  12. jiffies = jiffies_64 + 4;
  13. __page_offset = CONFIG_PAGE_OFFSET; /* start of area covered by struct pages */
  14. __kernel_image_start = __page_offset; /* address at which kernel image resides */
  15. SECTIONS
  16. {
  17. . = __kernel_image_start;
  18. /* discardable initialisation code and data */
  19. . = ALIGN(PAGE_SIZE); /* Init code and data */
  20. __init_begin = .;
  21. _sinittext = .;
  22. .init.text : {
  23. HEAD_TEXT
  24. #ifndef CONFIG_DEBUG_INFO
  25. INIT_TEXT
  26. EXIT_TEXT
  27. EXIT_DATA
  28. *(.exitcall.exit)
  29. #endif
  30. }
  31. _einittext = .;
  32. INIT_DATA_SECTION(8)
  33. PERCPU_SECTION(L1_CACHE_BYTES)
  34. . = ALIGN(PAGE_SIZE);
  35. __init_end = .;
  36. .trap : {
  37. /* trap table management - read entry-table.S before modifying */
  38. . = ALIGN(8192);
  39. __trap_tables = .;
  40. *(.trap.user)
  41. *(.trap.kernel)
  42. . = ALIGN(4096);
  43. *(.trap.break)
  44. }
  45. /* Text and read-only data */
  46. . = ALIGN(4);
  47. _text = .;
  48. _stext = .;
  49. .text : {
  50. *(.text..start)
  51. *(.text..entry)
  52. *(.text..break)
  53. *(.text..tlbmiss)
  54. TEXT_TEXT
  55. SCHED_TEXT
  56. CPUIDLE_TEXT
  57. LOCK_TEXT
  58. #ifdef CONFIG_DEBUG_INFO
  59. INIT_TEXT
  60. EXIT_TEXT
  61. *(.exitcall.exit)
  62. #endif
  63. *(.fixup)
  64. *(.gnu.warning)
  65. *(.exitcall.exit)
  66. } = 0x9090
  67. _etext = .; /* End of text section */
  68. RODATA
  69. .rodata : {
  70. *(.trap.vector)
  71. /* this clause must not be modified - the ordering and adjacency are imperative */
  72. __trap_fixup_tables = .;
  73. *(.trap.fixup.user .trap.fixup.kernel)
  74. }
  75. EXCEPTION_TABLE(8)
  76. _sdata = .;
  77. .data : { /* Data */
  78. INIT_TASK_DATA(THREAD_SIZE)
  79. CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES)
  80. DATA_DATA
  81. *(.data.*)
  82. EXIT_DATA
  83. CONSTRUCTORS
  84. }
  85. _edata = .; /* End of data section */
  86. /* GP section */
  87. . = ALIGN(L1_CACHE_BYTES);
  88. _gp = . + 2048;
  89. PROVIDE (gp = _gp);
  90. .sdata : { *(.sdata .sdata.*) }
  91. /* BSS */
  92. . = ALIGN(L1_CACHE_BYTES);
  93. __bss_start = .;
  94. .sbss : { *(.sbss .sbss.*) }
  95. .bss : { *(.bss .bss.*) }
  96. .bss..stack : { *(.bss) }
  97. __bss_stop = .;
  98. _end = . ;
  99. . = ALIGN(PAGE_SIZE);
  100. __kernel_image_end = .;
  101. STABS_DEBUG
  102. DWARF_DEBUG
  103. .comment 0 : { *(.comment) }
  104. DISCARDS
  105. }
  106. __kernel_image_size_no_bss = __bss_start - __kernel_image_start;