vmlinux.lds.S 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
  4. */
  5. #include <asm-generic/vmlinux.lds.h>
  6. #include <asm/cache.h>
  7. #include <asm/page.h>
  8. #include <asm/thread_info.h>
  9. OUTPUT_ARCH(arc)
  10. ENTRY(res_service)
  11. #ifdef CONFIG_CPU_BIG_ENDIAN
  12. jiffies = jiffies_64 + 4;
  13. #else
  14. jiffies = jiffies_64;
  15. #endif
  16. SECTIONS
  17. {
  18. /*
  19. * ICCM starts at 0x8000_0000. So if kernel is relocated to some other
  20. * address, make sure peripheral at 0x8z doesn't clash with ICCM
  21. * Essentially vector is also in ICCM.
  22. */
  23. . = CONFIG_LINUX_LINK_BASE;
  24. _int_vec_base_lds = .;
  25. .vector : {
  26. *(.vector)
  27. . = ALIGN(PAGE_SIZE);
  28. }
  29. #ifdef CONFIG_ARC_HAS_ICCM
  30. .text.arcfp : {
  31. *(.text.arcfp)
  32. . = ALIGN(CONFIG_ARC_ICCM_SZ * 1024);
  33. }
  34. #endif
  35. /*
  36. * The reason for having a seperate subsection .init.ramfs is to
  37. * prevent objump from including it in kernel dumps
  38. *
  39. * Reason for having .init.ramfs above .init is to make sure that the
  40. * binary blob is tucked away to one side, reducing the displacement
  41. * between .init.text and .text, avoiding any possible relocation
  42. * errors because of calls from .init.text to .text
  43. * Yes such calls do exist. e.g.
  44. * decompress_inflate.c:gunzip( ) -> zlib_inflate_workspace( )
  45. */
  46. __init_begin = .;
  47. .init.ramfs : { INIT_RAM_FS }
  48. . = ALIGN(PAGE_SIZE);
  49. HEAD_TEXT_SECTION
  50. INIT_TEXT_SECTION(L1_CACHE_BYTES)
  51. /* INIT_DATA_SECTION open-coded: special INIT_RAM_FS handling */
  52. .init.data : {
  53. INIT_DATA
  54. INIT_SETUP(L1_CACHE_BYTES)
  55. INIT_CALLS
  56. CON_INITCALL
  57. }
  58. .init.arch.info : {
  59. __arch_info_begin = .;
  60. *(.arch.info.init)
  61. __arch_info_end = .;
  62. }
  63. PERCPU_SECTION(L1_CACHE_BYTES)
  64. . = ALIGN(PAGE_SIZE);
  65. __init_end = .;
  66. .text : {
  67. _text = .;
  68. _stext = .;
  69. TEXT_TEXT
  70. SCHED_TEXT
  71. CPUIDLE_TEXT
  72. LOCK_TEXT
  73. KPROBES_TEXT
  74. IRQENTRY_TEXT
  75. SOFTIRQENTRY_TEXT
  76. *(.fixup)
  77. *(.gnu.warning)
  78. }
  79. EXCEPTION_TABLE(L1_CACHE_BYTES)
  80. _etext = .;
  81. _sdata = .;
  82. RO_DATA(PAGE_SIZE)
  83. /*
  84. * 1. this is .data essentially
  85. * 2. THREAD_SIZE for init.task, must be kernel-stk sz aligned
  86. */
  87. RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
  88. _edata = .;
  89. BSS_SECTION(4, 4, 4)
  90. #ifdef CONFIG_ARC_DW2_UNWIND
  91. . = ALIGN(PAGE_SIZE);
  92. .eh_frame : {
  93. __start_unwind = .;
  94. *(.eh_frame)
  95. __end_unwind = .;
  96. }
  97. #else
  98. /DISCARD/ : { *(.eh_frame) }
  99. #endif
  100. . = ALIGN(PAGE_SIZE);
  101. _end = . ;
  102. STABS_DEBUG
  103. ELF_DETAILS
  104. DISCARDS
  105. .arcextmap 0 : {
  106. *(.gnu.linkonce.arcextmap.*)
  107. *(.arcextmap.*)
  108. }
  109. #ifndef CONFIG_DEBUG_INFO
  110. /DISCARD/ : { *(.debug_frame) }
  111. /DISCARD/ : { *(.debug_aranges) }
  112. /DISCARD/ : { *(.debug_pubnames) }
  113. /DISCARD/ : { *(.debug_info) }
  114. /DISCARD/ : { *(.debug_abbrev) }
  115. /DISCARD/ : { *(.debug_line) }
  116. /DISCARD/ : { *(.debug_str) }
  117. /DISCARD/ : { *(.debug_loc) }
  118. /DISCARD/ : { *(.debug_macinfo) }
  119. /DISCARD/ : { *(.debug_ranges) }
  120. #endif
  121. #ifdef CONFIG_ARC_HAS_DCCM
  122. . = CONFIG_ARC_DCCM_BASE;
  123. __arc_dccm_base = .;
  124. .data.arcfp : {
  125. *(.data.arcfp)
  126. }
  127. . = ALIGN(CONFIG_ARC_DCCM_SZ * 1024);
  128. #endif
  129. }