vmlinux.lds.S 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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_INTRPT
  8. OUTPUT_ARCH(tile)
  9. ENTRY(_start)
  10. jiffies = jiffies_64;
  11. PHDRS
  12. {
  13. intrpt1 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. .intrpt1 (LOAD_OFFSET) : AT ( 0 ) /* put at the start of physical memory */
  24. {
  25. _text = .;
  26. *(.intrpt1)
  27. } :intrpt1 =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. IRQENTRY_TEXT
  41. __fix_text_end = .; /* tile-cpack won't rearrange before this */
  42. TEXT_TEXT
  43. *(.text.*)
  44. *(.coldtext*)
  45. *(.fixup)
  46. *(.gnu.warning)
  47. } :text =0
  48. _etext = .;
  49. /* "Init" is divided into two areas with very different virtual addresses. */
  50. INIT_TEXT_SECTION(PAGE_SIZE)
  51. /* Now we skip back to PAGE_OFFSET for the data. */
  52. . = (. - TEXT_OFFSET + PAGE_OFFSET);
  53. #undef LOAD_OFFSET
  54. #define LOAD_OFFSET PAGE_OFFSET
  55. . = ALIGN(PAGE_SIZE);
  56. __init_begin = .;
  57. VMLINUX_SYMBOL(_sinitdata) = .;
  58. INIT_DATA_SECTION(16) :data =0
  59. PERCPU_SECTION(L2_CACHE_BYTES)
  60. . = ALIGN(PAGE_SIZE);
  61. VMLINUX_SYMBOL(_einitdata) = .;
  62. __init_end = .;
  63. _sdata = .; /* Start of data section */
  64. RO_DATA_SECTION(PAGE_SIZE)
  65. /* initially writeable, then read-only */
  66. . = ALIGN(PAGE_SIZE);
  67. __w1data_begin = .;
  68. .w1data : AT(ADDR(.w1data) - LOAD_OFFSET) {
  69. VMLINUX_SYMBOL(__w1data_begin) = .;
  70. *(.w1data)
  71. VMLINUX_SYMBOL(__w1data_end) = .;
  72. }
  73. RW_DATA_SECTION(L2_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
  74. _edata = .;
  75. EXCEPTION_TABLE(L2_CACHE_BYTES)
  76. NOTES
  77. BSS_SECTION(8, PAGE_SIZE, 1)
  78. _end = . ;
  79. STABS_DEBUG
  80. DWARF_DEBUG
  81. DISCARDS
  82. }