vmlinux.lds.S 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #include <asm/vmlinux.lds.h>
  3. #include <asm/page.h>
  4. #include <asm/memory.h>
  5. OUTPUT_ARCH(csky)
  6. ENTRY(_start)
  7. #ifndef __cskyBE__
  8. jiffies = jiffies_64;
  9. #else
  10. jiffies = jiffies_64 + 4;
  11. #endif
  12. #define VBR_BASE \
  13. . = ALIGN(1024); \
  14. vec_base = .; \
  15. . += 512;
  16. SECTIONS
  17. {
  18. . = PAGE_OFFSET + PHYS_OFFSET_OFFSET;
  19. _start = .;
  20. HEAD_TEXT_SECTION
  21. . = ALIGN(PAGE_SIZE);
  22. .text : AT(ADDR(.text) - LOAD_OFFSET) {
  23. _text = .;
  24. _stext = .;
  25. VBR_BASE
  26. IRQENTRY_TEXT
  27. SOFTIRQENTRY_TEXT
  28. TEXT_TEXT
  29. SCHED_TEXT
  30. CPUIDLE_TEXT
  31. LOCK_TEXT
  32. KPROBES_TEXT
  33. *(.fixup)
  34. *(.gnu.warning)
  35. } = 0
  36. _etext = .;
  37. /* __init_begin __init_end must be page aligned for free_initmem */
  38. . = ALIGN(PAGE_SIZE);
  39. __init_begin = .;
  40. INIT_TEXT_SECTION(PAGE_SIZE)
  41. INIT_DATA_SECTION(PAGE_SIZE)
  42. PERCPU_SECTION(L1_CACHE_BYTES)
  43. . = ALIGN(PAGE_SIZE);
  44. __init_end = .;
  45. _sdata = .;
  46. RO_DATA(PAGE_SIZE)
  47. RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
  48. _edata = .;
  49. #ifdef CONFIG_HAVE_TCM
  50. .tcm_start : {
  51. . = ALIGN(PAGE_SIZE);
  52. __tcm_start = .;
  53. }
  54. .text_data_tcm FIXADDR_TCM : AT(__tcm_start)
  55. {
  56. . = ALIGN(4);
  57. __stcm_text_data = .;
  58. *(.tcm.text)
  59. *(.tcm.rodata)
  60. #ifndef CONFIG_HAVE_DTCM
  61. *(.tcm.data)
  62. #endif
  63. . = ALIGN(4);
  64. __etcm_text_data = .;
  65. }
  66. . = ADDR(.tcm_start) + SIZEOF(.tcm_start) + SIZEOF(.text_data_tcm);
  67. #ifdef CONFIG_HAVE_DTCM
  68. #define ITCM_SIZE CONFIG_ITCM_NR_PAGES * PAGE_SIZE
  69. .dtcm_start : {
  70. __dtcm_start = .;
  71. }
  72. .data_tcm FIXADDR_TCM + ITCM_SIZE : AT(__dtcm_start)
  73. {
  74. . = ALIGN(4);
  75. __stcm_data = .;
  76. *(.tcm.data)
  77. . = ALIGN(4);
  78. __etcm_data = .;
  79. }
  80. . = ADDR(.dtcm_start) + SIZEOF(.data_tcm);
  81. .tcm_end : AT(ADDR(.dtcm_start) + SIZEOF(.data_tcm)) {
  82. #else
  83. .tcm_end : AT(ADDR(.tcm_start) + SIZEOF(.text_data_tcm)) {
  84. #endif
  85. . = ALIGN(PAGE_SIZE);
  86. __tcm_end = .;
  87. }
  88. #endif
  89. EXCEPTION_TABLE(L1_CACHE_BYTES)
  90. BSS_SECTION(L1_CACHE_BYTES, PAGE_SIZE, L1_CACHE_BYTES)
  91. _end = . ;
  92. STABS_DEBUG
  93. DWARF_DEBUG
  94. ELF_DETAILS
  95. DISCARDS
  96. }