vmlinux.lds.S 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. LOCK_TEXT
  40. KPROBES_TEXT
  41. IRQENTRY_TEXT
  42. SOFTIRQENTRY_TEXT
  43. __fix_text_end = .; /* tile-cpack won't rearrange before this */
  44. ALIGN_FUNCTION();
  45. *(.hottext*)
  46. TEXT_TEXT
  47. *(.text.*)
  48. *(.coldtext*)
  49. *(.fixup)
  50. *(.gnu.warning)
  51. } :text =0
  52. _etext = .;
  53. /* "Init" is divided into two areas with very different virtual addresses. */
  54. INIT_TEXT_SECTION(PAGE_SIZE)
  55. /*
  56. * Some things, like the __jump_table, may contain symbol references
  57. * to __exit text, so include such text in the final image if so.
  58. * In that case we also override the _einittext from INIT_TEXT_SECTION.
  59. */
  60. #ifdef CONFIG_JUMP_LABEL
  61. .exit.text : {
  62. EXIT_TEXT
  63. _einittext = .;
  64. }
  65. #endif
  66. /* Now we skip back to PAGE_OFFSET for the data. */
  67. . = (. - TEXT_OFFSET + PAGE_OFFSET);
  68. #undef LOAD_OFFSET
  69. #define LOAD_OFFSET PAGE_OFFSET
  70. . = ALIGN(PAGE_SIZE);
  71. __init_begin = .;
  72. INIT_DATA_SECTION(16) :data =0
  73. PERCPU_SECTION(L2_CACHE_BYTES)
  74. . = ALIGN(PAGE_SIZE);
  75. __init_end = .;
  76. _sdata = .; /* Start of data section */
  77. RO_DATA_SECTION(PAGE_SIZE)
  78. RW_DATA_SECTION(L2_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
  79. _edata = .;
  80. EXCEPTION_TABLE(L2_CACHE_BYTES)
  81. NOTES
  82. BSS_SECTION(8, PAGE_SIZE, 1)
  83. _end = . ;
  84. STABS_DEBUG
  85. DWARF_DEBUG
  86. DISCARDS
  87. }