vmlinux.lds.S 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * ld script to make SuperH Linux kernel
  3. * Written by Niibe Yutaka and Paul Mundt
  4. */
  5. #ifdef CONFIG_SUPERH64
  6. #define LOAD_OFFSET PAGE_OFFSET
  7. OUTPUT_ARCH(sh:sh5)
  8. #else
  9. #define LOAD_OFFSET 0
  10. OUTPUT_ARCH(sh)
  11. #endif
  12. #include <asm/thread_info.h>
  13. #include <asm/cache.h>
  14. #include <asm/vmlinux.lds.h>
  15. #ifdef CONFIG_PMB
  16. #define MEMORY_OFFSET 0
  17. #else
  18. #define MEMORY_OFFSET __MEMORY_START
  19. #endif
  20. ENTRY(_start)
  21. SECTIONS
  22. {
  23. . = PAGE_OFFSET + MEMORY_OFFSET + PHYSICAL_OFFSET + CONFIG_ZERO_PAGE_OFFSET;
  24. _text = .; /* Text and read-only data */
  25. .empty_zero_page : AT(ADDR(.empty_zero_page) - LOAD_OFFSET) {
  26. *(.empty_zero_page)
  27. } = 0
  28. .text : AT(ADDR(.text) - LOAD_OFFSET) {
  29. HEAD_TEXT
  30. TEXT_TEXT
  31. EXTRA_TEXT
  32. SCHED_TEXT
  33. CPUIDLE_TEXT
  34. LOCK_TEXT
  35. KPROBES_TEXT
  36. IRQENTRY_TEXT
  37. SOFTIRQENTRY_TEXT
  38. *(.fixup)
  39. *(.gnu.warning)
  40. _etext = .; /* End of text section */
  41. } = 0x0009
  42. EXCEPTION_TABLE(16)
  43. NOTES
  44. _sdata = .;
  45. RO_DATA(PAGE_SIZE)
  46. RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
  47. _edata = .;
  48. DWARF_EH_FRAME
  49. . = ALIGN(PAGE_SIZE); /* Init code and data */
  50. __init_begin = .;
  51. INIT_TEXT_SECTION(PAGE_SIZE)
  52. INIT_DATA_SECTION(16)
  53. . = ALIGN(4);
  54. .machvec.init : AT(ADDR(.machvec.init) - LOAD_OFFSET) {
  55. __machvec_start = .;
  56. *(.machvec.init)
  57. __machvec_end = .;
  58. }
  59. PERCPU_SECTION(L1_CACHE_BYTES)
  60. /*
  61. * .exit.text is discarded at runtime, not link time, to deal with
  62. * references from __bug_table
  63. */
  64. .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { EXIT_TEXT }
  65. .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { EXIT_DATA }
  66. . = ALIGN(PAGE_SIZE);
  67. __init_end = .;
  68. BSS_SECTION(0, PAGE_SIZE, 4)
  69. _end = . ;
  70. STABS_DEBUG
  71. DWARF_DEBUG
  72. DISCARDS
  73. }