vmlinux.lds.S 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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. }
  62. .init.arch.info : {
  63. __arch_info_begin = .;
  64. *(.arch.info.init)
  65. __arch_info_end = .;
  66. }
  67. PERCPU_SECTION(L1_CACHE_BYTES)
  68. . = ALIGN(PAGE_SIZE);
  69. __init_end = .;
  70. .text : {
  71. _text = .;
  72. TEXT_TEXT
  73. SCHED_TEXT
  74. CPUIDLE_TEXT
  75. LOCK_TEXT
  76. KPROBES_TEXT
  77. *(.fixup)
  78. *(.gnu.warning)
  79. }
  80. EXCEPTION_TABLE(L1_CACHE_BYTES)
  81. _etext = .;
  82. _sdata = .;
  83. RO_DATA_SECTION(PAGE_SIZE)
  84. /*
  85. * 1. this is .data essentially
  86. * 2. THREAD_SIZE for init.task, must be kernel-stk sz aligned
  87. */
  88. RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
  89. _edata = .;
  90. BSS_SECTION(4, 4, 4)
  91. #ifdef CONFIG_ARC_DW2_UNWIND
  92. . = ALIGN(PAGE_SIZE);
  93. .eh_frame : {
  94. __start_unwind = .;
  95. *(.eh_frame)
  96. __end_unwind = .;
  97. }
  98. #else
  99. /DISCARD/ : { *(.eh_frame) }
  100. #endif
  101. NOTES
  102. . = ALIGN(PAGE_SIZE);
  103. _end = . ;
  104. STABS_DEBUG
  105. DISCARDS
  106. .arcextmap 0 : {
  107. *(.gnu.linkonce.arcextmap.*)
  108. *(.arcextmap.*)
  109. }
  110. #ifndef CONFIG_DEBUG_INFO
  111. /DISCARD/ : { *(.debug_frame) }
  112. /DISCARD/ : { *(.debug_aranges) }
  113. /DISCARD/ : { *(.debug_pubnames) }
  114. /DISCARD/ : { *(.debug_info) }
  115. /DISCARD/ : { *(.debug_abbrev) }
  116. /DISCARD/ : { *(.debug_line) }
  117. /DISCARD/ : { *(.debug_str) }
  118. /DISCARD/ : { *(.debug_loc) }
  119. /DISCARD/ : { *(.debug_macinfo) }
  120. /DISCARD/ : { *(.debug_ranges) }
  121. #endif
  122. #ifdef CONFIG_ARC_HAS_DCCM
  123. . = CONFIG_ARC_DCCM_BASE;
  124. __arc_dccm_base = .;
  125. .data.arcfp : {
  126. *(.data.arcfp)
  127. }
  128. . = ALIGN(CONFIG_ARC_DCCM_SZ * 1024);
  129. #endif
  130. }