vmlinux.lds.S 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. /* MN10300 Main kernel linker script
  2. *
  3. * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
  4. * Written by David Howells (dhowells@redhat.com)
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public Licence
  8. * as published by the Free Software Foundation; either version
  9. * 2 of the Licence, or (at your option) any later version.
  10. */
  11. #define __VMLINUX_LDS__
  12. #include <asm-generic/vmlinux.lds.h>
  13. #include <asm/thread_info.h>
  14. OUTPUT_FORMAT("elf32-am33lin", "elf32-am33lin", "elf32-am33lin")
  15. OUTPUT_ARCH(mn10300)
  16. ENTRY(_start)
  17. jiffies = jiffies_64;
  18. #ifndef CONFIG_MN10300_CURRENT_IN_E2
  19. current = __current;
  20. #endif
  21. SECTIONS
  22. {
  23. . = CONFIG_KERNEL_TEXT_ADDRESS;
  24. /* read-only */
  25. _stext = .;
  26. _text = .; /* Text and read-only data */
  27. .text : {
  28. *(
  29. .text.head
  30. .text
  31. )
  32. TEXT_TEXT
  33. SCHED_TEXT
  34. LOCK_TEXT
  35. KPROBES_TEXT
  36. *(.fixup)
  37. *(.gnu.warning)
  38. } = 0xcb
  39. _etext = .; /* End of text section */
  40. . = ALIGN(16); /* Exception table */
  41. __start___ex_table = .;
  42. __ex_table : { *(__ex_table) }
  43. __stop___ex_table = .;
  44. BUG_TABLE
  45. RODATA
  46. /* writeable */
  47. .data : { /* Data */
  48. DATA_DATA
  49. CONSTRUCTORS
  50. }
  51. . = ALIGN(4096);
  52. __nosave_begin = .;
  53. .data_nosave : { *(.data.nosave) }
  54. . = ALIGN(4096);
  55. __nosave_end = .;
  56. . = ALIGN(4096);
  57. .data.page_aligned : { *(.data.idt) }
  58. . = ALIGN(32);
  59. .data.cacheline_aligned : { *(.data.cacheline_aligned) }
  60. /* rarely changed data like cpu maps */
  61. . = ALIGN(32);
  62. .data.read_mostly : AT(ADDR(.data.read_mostly)) {
  63. *(.data.read_mostly)
  64. _edata = .; /* End of data section */
  65. }
  66. . = ALIGN(THREAD_SIZE); /* init_task */
  67. .data.init_task : { *(.data.init_task) }
  68. /* might get freed after init */
  69. . = ALIGN(4096);
  70. .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
  71. __smp_locks = .;
  72. *(.smp_locks)
  73. __smp_locks_end = .;
  74. }
  75. /* will be freed after init */
  76. . = ALIGN(4096); /* Init code and data */
  77. __init_begin = .;
  78. .init.text : {
  79. _sinittext = .;
  80. *(.init.text)
  81. _einittext = .;
  82. }
  83. .init.data : { *(.init.data) }
  84. . = ALIGN(16);
  85. __setup_start = .;
  86. .setup.init : { KEEP(*(.init.setup)) }
  87. __setup_end = .;
  88. __initcall_start = .;
  89. .initcall.init : {
  90. INITCALLS
  91. }
  92. __initcall_end = .;
  93. __con_initcall_start = .;
  94. .con_initcall.init : { *(.con_initcall.init) }
  95. __con_initcall_end = .;
  96. SECURITY_INIT
  97. . = ALIGN(4);
  98. __alt_instructions = .;
  99. .altinstructions : { *(.altinstructions) }
  100. __alt_instructions_end = .;
  101. .altinstr_replacement : { *(.altinstr_replacement) }
  102. /* .exit.text is discard at runtime, not link time, to deal with references
  103. from .altinstructions and .eh_frame */
  104. .exit.text : { *(.exit.text) }
  105. .exit.data : { *(.exit.data) }
  106. #ifdef CONFIG_BLK_DEV_INITRD
  107. . = ALIGN(4096);
  108. __initramfs_start = .;
  109. .init.ramfs : { *(.init.ramfs) }
  110. __initramfs_end = .;
  111. #endif
  112. . = ALIGN(32);
  113. __per_cpu_start = .;
  114. .data.percpu : { *(.data.percpu) }
  115. __per_cpu_end = .;
  116. . = ALIGN(4096);
  117. __init_end = .;
  118. /* freed after init ends here */
  119. __bss_start = .; /* BSS */
  120. .bss : {
  121. *(.bss.page_aligned)
  122. *(.bss)
  123. }
  124. . = ALIGN(4);
  125. __bss_stop = .;
  126. _end = . ;
  127. /* This is where the kernel creates the early boot page tables */
  128. . = ALIGN(4096);
  129. pg0 = .;
  130. /* Sections to be discarded */
  131. /DISCARD/ : {
  132. *(.exitcall.exit)
  133. }
  134. STABS_DEBUG
  135. DWARF_DEBUG
  136. }