vmlinux.lds.S 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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. LOCK_TEXT
  57. #ifdef CONFIG_DEBUG_INFO
  58. INIT_TEXT
  59. EXIT_TEXT
  60. *(.exitcall.exit)
  61. #endif
  62. *(.fixup)
  63. *(.gnu.warning)
  64. *(.exitcall.exit)
  65. } = 0x9090
  66. _etext = .; /* End of text section */
  67. RODATA
  68. .rodata : {
  69. *(.trap.vector)
  70. /* this clause must not be modified - the ordering and adjacency are imperative */
  71. __trap_fixup_tables = .;
  72. *(.trap.fixup.user .trap.fixup.kernel)
  73. }
  74. EXCEPTION_TABLE(8)
  75. _sdata = .;
  76. .data : { /* Data */
  77. INIT_TASK_DATA(THREAD_SIZE)
  78. CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES)
  79. DATA_DATA
  80. *(.data.*)
  81. EXIT_DATA
  82. CONSTRUCTORS
  83. }
  84. _edata = .; /* End of data section */
  85. /* GP section */
  86. . = ALIGN(L1_CACHE_BYTES);
  87. _gp = . + 2048;
  88. PROVIDE (gp = _gp);
  89. .sdata : { *(.sdata .sdata.*) }
  90. /* BSS */
  91. . = ALIGN(L1_CACHE_BYTES);
  92. __bss_start = .;
  93. .sbss : { *(.sbss .sbss.*) }
  94. .bss : { *(.bss .bss.*) }
  95. .bss..stack : { *(.bss) }
  96. __bss_stop = .;
  97. _end = . ;
  98. . = ALIGN(PAGE_SIZE);
  99. __kernel_image_end = .;
  100. STABS_DEBUG
  101. DWARF_DEBUG
  102. .comment 0 : { *(.comment) }
  103. DISCARDS
  104. }
  105. __kernel_image_size_no_bss = __bss_start - __kernel_image_start;