vmlinux.lds.S 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. /*
  2. * ld script for the c6x kernel
  3. *
  4. * Copyright (C) 2010, 2011 Texas Instruments Incorporated
  5. * Mark Salter <msalter@redhat.com>
  6. */
  7. #include <asm-generic/vmlinux.lds.h>
  8. #include <asm/thread_info.h>
  9. #include <asm/page.h>
  10. ENTRY(_c_int00)
  11. #if defined(CONFIG_CPU_BIG_ENDIAN)
  12. jiffies = jiffies_64 + 4;
  13. #else
  14. jiffies = jiffies_64;
  15. #endif
  16. #define READONLY_SEGMENT_START \
  17. . = PAGE_OFFSET;
  18. #define READWRITE_SEGMENT_START \
  19. . = ALIGN(128); \
  20. _data_lma = .;
  21. SECTIONS
  22. {
  23. /*
  24. * Start kernel read only segment
  25. */
  26. READONLY_SEGMENT_START
  27. .vectors :
  28. {
  29. _vectors_start = .;
  30. *(.vectors)
  31. . = ALIGN(0x400);
  32. _vectors_end = .;
  33. }
  34. . = ALIGN(0x1000);
  35. .cmdline :
  36. {
  37. *(.cmdline)
  38. }
  39. /*
  40. * This section contains data which may be shared with other
  41. * cores. It needs to be a fixed offset from PAGE_OFFSET
  42. * regardless of kernel configuration.
  43. */
  44. .virtio_ipc_dev :
  45. {
  46. *(.virtio_ipc_dev)
  47. }
  48. . = ALIGN(PAGE_SIZE);
  49. .init :
  50. {
  51. _stext = .;
  52. _sinittext = .;
  53. HEAD_TEXT
  54. INIT_TEXT
  55. _einittext = .;
  56. }
  57. __init_begin = _stext;
  58. INIT_DATA_SECTION(16)
  59. PERCPU_SECTION(128)
  60. . = ALIGN(PAGE_SIZE);
  61. __init_end = .;
  62. .text :
  63. {
  64. _text = .;
  65. TEXT_TEXT
  66. SCHED_TEXT
  67. LOCK_TEXT
  68. IRQENTRY_TEXT
  69. KPROBES_TEXT
  70. *(.fixup)
  71. *(.gnu.warning)
  72. }
  73. EXCEPTION_TABLE(16)
  74. NOTES
  75. RO_DATA_SECTION(PAGE_SIZE)
  76. .const :
  77. {
  78. *(.const .const.* .gnu.linkonce.r.*)
  79. *(.switch)
  80. }
  81. . = ALIGN (8) ;
  82. __fdt_blob : AT(ADDR(__fdt_blob) - LOAD_OFFSET)
  83. {
  84. _fdt_start = . ; /* place for fdt blob */
  85. *(__fdt_blob) ; /* Any link-placed DTB */
  86. BYTE(0); /* section always has contents */
  87. . = _fdt_start + 0x4000; /* Pad up to 16kbyte */
  88. _fdt_end = . ;
  89. }
  90. _etext = .;
  91. /*
  92. * Start kernel read-write segment.
  93. */
  94. READWRITE_SEGMENT_START
  95. _sdata = .;
  96. .fardata : AT(ADDR(.fardata) - LOAD_OFFSET)
  97. {
  98. INIT_TASK_DATA(THREAD_SIZE)
  99. NOSAVE_DATA
  100. PAGE_ALIGNED_DATA(PAGE_SIZE)
  101. CACHELINE_ALIGNED_DATA(128)
  102. READ_MOSTLY_DATA(128)
  103. DATA_DATA
  104. CONSTRUCTORS
  105. *(.data1)
  106. *(.fardata .fardata.*)
  107. *(.data.debug_bpt)
  108. }
  109. .neardata ALIGN(8) : AT(ADDR(.neardata) - LOAD_OFFSET)
  110. {
  111. *(.neardata2 .neardata2.* .gnu.linkonce.s2.*)
  112. *(.neardata .neardata.* .gnu.linkonce.s.*)
  113. . = ALIGN(8);
  114. }
  115. _edata = .;
  116. __bss_start = .;
  117. SBSS(8)
  118. BSS(8)
  119. .far :
  120. {
  121. . = ALIGN(8);
  122. *(.dynfar)
  123. *(.far .far.* .gnu.linkonce.b.*)
  124. . = ALIGN(8);
  125. }
  126. __bss_stop = .;
  127. _end = .;
  128. DWARF_DEBUG
  129. /DISCARD/ :
  130. {
  131. EXIT_TEXT
  132. EXIT_DATA
  133. EXIT_CALL
  134. *(.discard)
  135. *(.discard.*)
  136. *(.interp)
  137. }
  138. }