vmlinux.lds.S 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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. #include <plat/memmap.h>
  13. OUTPUT_ARCH(arc)
  14. ENTRY(_stext)
  15. #ifdef CONFIG_CPU_BIG_ENDIAN
  16. jiffies = jiffies_64 + 4;
  17. #else
  18. jiffies = jiffies_64;
  19. #endif
  20. SECTIONS
  21. {
  22. . = CONFIG_LINUX_LINK_BASE;
  23. _int_vec_base_lds = .;
  24. .vector : {
  25. *(.vector)
  26. . = ALIGN(PAGE_SIZE);
  27. }
  28. /*
  29. * The reason for having a seperate subsection .init.ramfs is to
  30. * prevent objump from including it in kernel dumps
  31. *
  32. * Reason for having .init.ramfs above .init is to make sure that the
  33. * binary blob is tucked away to one side, reducing the displacement
  34. * between .init.text and .text, avoiding any possible relocation
  35. * errors because of calls from .init.text to .text
  36. * Yes such calls do exist. e.g.
  37. * decompress_inflate.c:gunzip( ) -> zlib_inflate_workspace( )
  38. */
  39. __init_begin = .;
  40. .init.ramfs : { INIT_RAM_FS }
  41. . = ALIGN(PAGE_SIZE);
  42. _stext = .;
  43. HEAD_TEXT_SECTION
  44. INIT_TEXT_SECTION(L1_CACHE_BYTES)
  45. /* INIT_DATA_SECTION open-coded: special INIT_RAM_FS handling */
  46. .init.data : {
  47. INIT_DATA
  48. INIT_SETUP(L1_CACHE_BYTES)
  49. INIT_CALLS
  50. CON_INITCALL
  51. SECURITY_INITCALL
  52. }
  53. PERCPU_SECTION(L1_CACHE_BYTES)
  54. /*
  55. * .exit.text is discard at runtime, not link time, to deal with
  56. * references from .debug_frame
  57. * It will be init freed, being inside [__init_start : __init_end]
  58. */
  59. .exit.text : { EXIT_TEXT }
  60. .exit.data : { EXIT_DATA }
  61. . = ALIGN(PAGE_SIZE);
  62. __init_end = .;
  63. .text : {
  64. _text = .;
  65. TEXT_TEXT
  66. SCHED_TEXT
  67. LOCK_TEXT
  68. KPROBES_TEXT
  69. *(.fixup)
  70. *(.gnu.warning)
  71. }
  72. EXCEPTION_TABLE(L1_CACHE_BYTES)
  73. _etext = .;
  74. _sdata = .;
  75. RO_DATA_SECTION(PAGE_SIZE)
  76. /*
  77. * 1. this is .data essentially
  78. * 2. THREAD_SIZE for init.task, must be kernel-stk sz aligned
  79. */
  80. RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
  81. _edata = .;
  82. BSS_SECTION(0, 0, 0)
  83. #ifdef CONFIG_ARC_DW2_UNWIND
  84. . = ALIGN(PAGE_SIZE);
  85. .debug_frame : {
  86. __start_unwind = .;
  87. *(.debug_frame)
  88. __end_unwind = .;
  89. }
  90. #else
  91. /DISCARD/ : { *(.debug_frame) }
  92. #endif
  93. NOTES
  94. . = ALIGN(PAGE_SIZE);
  95. _end = . ;
  96. STABS_DEBUG
  97. DISCARDS
  98. .arcextmap 0 : {
  99. *(.gnu.linkonce.arcextmap.*)
  100. *(.arcextmap.*)
  101. }
  102. /* open-coded because we need .debug_frame seperately for unwinding */
  103. .debug_aranges 0 : { *(.debug_aranges) }
  104. .debug_pubnames 0 : { *(.debug_pubnames) }
  105. .debug_info 0 : { *(.debug_info) }
  106. .debug_abbrev 0 : { *(.debug_abbrev) }
  107. .debug_line 0 : { *(.debug_line) }
  108. .debug_str 0 : { *(.debug_str) }
  109. .debug_loc 0 : { *(.debug_loc) }
  110. .debug_macinfo 0 : { *(.debug_macinfo) }
  111. }