vmlinux.lds.S 3.1 KB

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