vmlinux.lds.S 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. #include "hvglue.lds"
  30. /* Now the real code */
  31. . = ALIGN(0x20000);
  32. _stext = .;
  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. __init_begin = .;
  53. VMLINUX_SYMBOL(_sinitdata) = .;
  54. INIT_DATA_SECTION(16) :data =0
  55. PERCPU_SECTION(L2_CACHE_BYTES)
  56. . = ALIGN(PAGE_SIZE);
  57. VMLINUX_SYMBOL(_einitdata) = .;
  58. __init_end = .;
  59. _sdata = .; /* Start of data section */
  60. RO_DATA_SECTION(PAGE_SIZE)
  61. /* initially writeable, then read-only */
  62. . = ALIGN(PAGE_SIZE);
  63. __w1data_begin = .;
  64. .w1data : AT(ADDR(.w1data) - LOAD_OFFSET) {
  65. VMLINUX_SYMBOL(__w1data_begin) = .;
  66. *(.w1data)
  67. VMLINUX_SYMBOL(__w1data_end) = .;
  68. }
  69. RW_DATA_SECTION(L2_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
  70. _edata = .;
  71. EXCEPTION_TABLE(L2_CACHE_BYTES)
  72. NOTES
  73. BSS_SECTION(8, PAGE_SIZE, 1)
  74. _end = . ;
  75. STABS_DEBUG
  76. DWARF_DEBUG
  77. DISCARDS
  78. }