vmlinux.lds.S 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. LOCK_TEXT
  34. KPROBES_TEXT
  35. IRQENTRY_TEXT
  36. *(.fixup)
  37. *(.gnu.warning)
  38. _etext = .; /* End of text section */
  39. } = 0x0009
  40. EXCEPTION_TABLE(16)
  41. NOTES
  42. _sdata = .;
  43. RO_DATA(PAGE_SIZE)
  44. RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
  45. _edata = .;
  46. DWARF_EH_FRAME
  47. . = ALIGN(PAGE_SIZE); /* Init code and data */
  48. __init_begin = .;
  49. INIT_TEXT_SECTION(PAGE_SIZE)
  50. INIT_DATA_SECTION(16)
  51. . = ALIGN(4);
  52. .machvec.init : AT(ADDR(.machvec.init) - LOAD_OFFSET) {
  53. __machvec_start = .;
  54. *(.machvec.init)
  55. __machvec_end = .;
  56. }
  57. PERCPU_SECTION(L1_CACHE_BYTES)
  58. /*
  59. * .exit.text is discarded at runtime, not link time, to deal with
  60. * references from __bug_table
  61. */
  62. .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { EXIT_TEXT }
  63. .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { EXIT_DATA }
  64. . = ALIGN(PAGE_SIZE);
  65. __init_end = .;
  66. BSS_SECTION(0, PAGE_SIZE, 4)
  67. _end = . ;
  68. STABS_DEBUG
  69. DWARF_DEBUG
  70. DISCARDS
  71. }