vmlinux.lds.S 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. #include <asm-generic/vmlinux.lds.h>
  2. #include <asm/page.h>
  3. #include <asm/cache.h>
  4. #include <asm/thread_info.h>
  5. #include <hv/hypervisor.h>
  6. /* Text loads starting from the supervisor interrupt vector address. */
  7. #define TEXT_OFFSET MEM_SV_START
  8. OUTPUT_ARCH(tile)
  9. ENTRY(_start)
  10. jiffies = jiffies_64;
  11. PHDRS
  12. {
  13. intrpt PT_LOAD ;
  14. text PT_LOAD ;
  15. data PT_LOAD ;
  16. }
  17. SECTIONS
  18. {
  19. /* Text is loaded with a different VA than data; start with text. */
  20. #undef LOAD_OFFSET
  21. #define LOAD_OFFSET TEXT_OFFSET
  22. /* Interrupt vectors */
  23. .intrpt (LOAD_OFFSET) : AT ( 0 ) /* put at the start of physical memory */
  24. {
  25. _text = .;
  26. *(.intrpt)
  27. } :intrpt =0
  28. /* Hypervisor call vectors */
  29. . = ALIGN(0x10000);
  30. .hvglue : AT (ADDR(.hvglue) - LOAD_OFFSET) {
  31. *(.hvglue)
  32. } :NONE
  33. /* Now the real code */
  34. . = ALIGN(0x20000);
  35. _stext = .;
  36. .text : AT (ADDR(.text) - LOAD_OFFSET) {
  37. HEAD_TEXT
  38. SCHED_TEXT
  39. CPUIDLE_TEXT
  40. LOCK_TEXT
  41. KPROBES_TEXT
  42. IRQENTRY_TEXT
  43. SOFTIRQENTRY_TEXT
  44. __fix_text_end = .; /* tile-cpack won't rearrange before this */
  45. ALIGN_FUNCTION();
  46. *(.hottext*)
  47. TEXT_TEXT
  48. *(.text.*)
  49. *(.coldtext*)
  50. *(.fixup)
  51. *(.gnu.warning)
  52. } :text =0
  53. _etext = .;
  54. /* "Init" is divided into two areas with very different virtual addresses. */
  55. INIT_TEXT_SECTION(PAGE_SIZE)
  56. /*
  57. * Some things, like the __jump_table, may contain symbol references
  58. * to __exit text, so include such text in the final image if so.
  59. * In that case we also override the _einittext from INIT_TEXT_SECTION.
  60. */
  61. #ifdef CONFIG_JUMP_LABEL
  62. .exit.text : {
  63. EXIT_TEXT
  64. _einittext = .;
  65. }
  66. #endif
  67. /* Now we skip back to PAGE_OFFSET for the data. */
  68. . = (. - TEXT_OFFSET + PAGE_OFFSET);
  69. #undef LOAD_OFFSET
  70. #define LOAD_OFFSET PAGE_OFFSET
  71. . = ALIGN(PAGE_SIZE);
  72. __init_begin = .;
  73. INIT_DATA_SECTION(16) :data =0
  74. PERCPU_SECTION(L2_CACHE_BYTES)
  75. . = ALIGN(PAGE_SIZE);
  76. __init_end = .;
  77. _sdata = .; /* Start of data section */
  78. RO_DATA_SECTION(PAGE_SIZE)
  79. RW_DATA_SECTION(L2_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
  80. _edata = .;
  81. EXCEPTION_TABLE(L2_CACHE_BYTES)
  82. NOTES
  83. BSS_SECTION(8, PAGE_SIZE, 1)
  84. _end = . ;
  85. STABS_DEBUG
  86. DWARF_DEBUG
  87. DISCARDS
  88. }