vmlinux.lds.S 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * arch/sh5/vmlinux.lds.S
  7. *
  8. * ld script to make ST50 Linux kernel
  9. *
  10. * Copyright (C) 2000, 2001 Paolo Alberelli
  11. *
  12. * benedict.gaster@superh.com: 2nd May 2002
  13. * Add definition of empty_zero_page to be the first page of kernel image.
  14. *
  15. * benedict.gaster@superh.com: 3rd May 2002
  16. * Added support for ramdisk, removing statically linked romfs at the same time.
  17. *
  18. * lethal@linux-sh.org: 9th May 2003
  19. * Kill off GLOBAL_NAME() usage and other CDC-isms.
  20. *
  21. * lethal@linux-sh.org: 19th May 2003
  22. * Remove support for ancient toolchains.
  23. */
  24. #include <asm/page.h>
  25. #include <asm/cache.h>
  26. #include <asm/processor.h>
  27. #include <asm/thread_info.h>
  28. #define LOAD_OFFSET CONFIG_CACHED_MEMORY_OFFSET
  29. #include <asm-generic/vmlinux.lds.h>
  30. OUTPUT_ARCH(sh:sh5)
  31. #define C_PHYS(x) AT (ADDR(x) - LOAD_OFFSET)
  32. ENTRY(__start)
  33. SECTIONS
  34. {
  35. . = CONFIG_CACHED_MEMORY_OFFSET + CONFIG_MEMORY_START + PAGE_SIZE;
  36. _text = .; /* Text and read-only data */
  37. text = .; /* Text and read-only data */
  38. .empty_zero_page : C_PHYS(.empty_zero_page) {
  39. *(.empty_zero_page)
  40. } = 0
  41. .text : C_PHYS(.text) {
  42. *(.text.head)
  43. TEXT_TEXT
  44. *(.text64)
  45. *(.text..SHmedia32)
  46. SCHED_TEXT
  47. LOCK_TEXT
  48. *(.fixup)
  49. *(.gnu.warning)
  50. #ifdef CONFIG_LITTLE_ENDIAN
  51. } = 0x6ff0fff0
  52. #else
  53. } = 0xf0fff06f
  54. #endif
  55. /* We likely want __ex_table to be Cache Line aligned */
  56. . = ALIGN(L1_CACHE_BYTES); /* Exception table */
  57. __start___ex_table = .;
  58. __ex_table : C_PHYS(__ex_table) { *(__ex_table) }
  59. __stop___ex_table = .;
  60. _etext = .; /* End of text section */
  61. NOTES
  62. RODATA
  63. .data : C_PHYS(.data) { /* Data */
  64. DATA_DATA
  65. CONSTRUCTORS
  66. }
  67. . = ALIGN(PAGE_SIZE);
  68. .data.page_aligned : C_PHYS(.data.page_aligned) { *(.data.page_aligned) }
  69. PERCPU(PAGE_SIZE)
  70. . = ALIGN(L1_CACHE_BYTES);
  71. .data.cacheline_aligned : C_PHYS(.data.cacheline_aligned) { *(.data.cacheline_aligned) }
  72. _edata = .; /* End of data section */
  73. . = ALIGN(THREAD_SIZE); /* init_task: structure size aligned */
  74. .data.init_task : C_PHYS(.data.init_task) { *(.data.init_task) }
  75. . = ALIGN(PAGE_SIZE); /* Init code and data */
  76. __init_begin = .;
  77. _sinittext = .;
  78. .init.text : C_PHYS(.init.text) { *(.init.text) }
  79. _einittext = .;
  80. .init.data : C_PHYS(.init.data) { *(.init.data) }
  81. . = ALIGN(L1_CACHE_BYTES); /* Better if Cache Line aligned */
  82. __setup_start = .;
  83. .init.setup : C_PHYS(.init.setup) { *(.init.setup) }
  84. __setup_end = .;
  85. __initcall_start = .;
  86. .initcall.init : C_PHYS(.initcall.init) {
  87. INITCALLS
  88. }
  89. __initcall_end = .;
  90. __con_initcall_start = .;
  91. .con_initcall.init : C_PHYS(.con_initcall.init) { *(.con_initcall.init) }
  92. __con_initcall_end = .;
  93. SECURITY_INIT
  94. #ifdef CONFIG_BLK_DEV_INITRD
  95. __initramfs_start = .;
  96. .init.ramfs : C_PHYS(.init.ramfs) { *(.init.ramfs) }
  97. __initramfs_end = .;
  98. #endif
  99. . = ALIGN(PAGE_SIZE);
  100. __init_end = .;
  101. /* Align to the biggest single data representation, head and tail */
  102. . = ALIGN(8);
  103. __bss_start = .; /* BSS */
  104. .bss : C_PHYS(.bss) {
  105. *(.bss)
  106. }
  107. . = ALIGN(8);
  108. _end = . ;
  109. /* Sections to be discarded */
  110. /DISCARD/ : {
  111. *(.exit.text)
  112. *(.exit.data)
  113. *(.exitcall.exit)
  114. }
  115. STABS_DEBUG
  116. DWARF_DEBUG
  117. }