vmlinux.lds.S 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. _stext = .;
  27. *(.intrpt1)
  28. } :intrpt1 =0
  29. /* Hypervisor call vectors */
  30. #include "hvglue.lds"
  31. /* Now the real code */
  32. . = ALIGN(0x20000);
  33. .text : AT (ADDR(.text) - LOAD_OFFSET) {
  34. HEAD_TEXT
  35. SCHED_TEXT
  36. LOCK_TEXT
  37. __fix_text_end = .; /* tile-cpack won't rearrange before this */
  38. TEXT_TEXT
  39. *(.text.*)
  40. *(.coldtext*)
  41. *(.fixup)
  42. *(.gnu.warning)
  43. } :text =0
  44. _etext = .;
  45. /* "Init" is divided into two areas with very different virtual addresses. */
  46. INIT_TEXT_SECTION(PAGE_SIZE)
  47. /* Now we skip back to PAGE_OFFSET for the data. */
  48. . = (. - TEXT_OFFSET + PAGE_OFFSET);
  49. #undef LOAD_OFFSET
  50. #define LOAD_OFFSET PAGE_OFFSET
  51. . = ALIGN(PAGE_SIZE);
  52. VMLINUX_SYMBOL(_sinitdata) = .;
  53. INIT_DATA_SECTION(16) :data =0
  54. PERCPU_SECTION(L2_CACHE_BYTES)
  55. . = ALIGN(PAGE_SIZE);
  56. VMLINUX_SYMBOL(_einitdata) = .;
  57. _sdata = .; /* Start of data section */
  58. RO_DATA_SECTION(PAGE_SIZE)
  59. /* initially writeable, then read-only */
  60. . = ALIGN(PAGE_SIZE);
  61. __w1data_begin = .;
  62. .w1data : AT(ADDR(.w1data) - LOAD_OFFSET) {
  63. VMLINUX_SYMBOL(__w1data_begin) = .;
  64. *(.w1data)
  65. VMLINUX_SYMBOL(__w1data_end) = .;
  66. }
  67. RW_DATA_SECTION(L2_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
  68. _edata = .;
  69. EXCEPTION_TABLE(L2_CACHE_BYTES)
  70. NOTES
  71. BSS_SECTION(8, PAGE_SIZE, 1)
  72. _end = . ;
  73. STABS_DEBUG
  74. DWARF_DEBUG
  75. DISCARDS
  76. }