vdso64.lds.S 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /*
  2. * This is the infamous ld script for the 64 bits vdso
  3. * library
  4. */
  5. #include <asm/vdso.h>
  6. OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc", "elf64-powerpc")
  7. OUTPUT_ARCH(powerpc:common64)
  8. ENTRY(_start)
  9. SECTIONS
  10. {
  11. . = VDSO64_LBASE + SIZEOF_HEADERS;
  12. .hash : { *(.hash) } :text
  13. .dynsym : { *(.dynsym) }
  14. .dynstr : { *(.dynstr) }
  15. .gnu.version : { *(.gnu.version) }
  16. .gnu.version_d : { *(.gnu.version_d) }
  17. .gnu.version_r : { *(.gnu.version_r) }
  18. .note : { *(.note.*) } :text :note
  19. . = ALIGN (16);
  20. .text :
  21. {
  22. *(.text .stub .text.* .gnu.linkonce.t.*)
  23. *(.sfpr .glink)
  24. } :text
  25. PROVIDE (__etext = .);
  26. PROVIDE (_etext = .);
  27. PROVIDE (etext = .);
  28. /* Other stuff is appended to the text segment: */
  29. .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
  30. .rodata1 : { *(.rodata1) }
  31. .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr
  32. .eh_frame : { KEEP (*(.eh_frame)) } :text
  33. .gcc_except_table : { *(.gcc_except_table) }
  34. .opd ALIGN(8) : { KEEP (*(.opd)) }
  35. .got ALIGN(8) : { *(.got .toc) }
  36. .rela.dyn ALIGN(8) : { *(.rela.dyn) }
  37. .dynamic : { *(.dynamic) } :text :dynamic
  38. _end = .;
  39. PROVIDE (end = .);
  40. /* Stabs debugging sections are here too
  41. */
  42. .stab 0 : { *(.stab) }
  43. .stabstr 0 : { *(.stabstr) }
  44. .stab.excl 0 : { *(.stab.excl) }
  45. .stab.exclstr 0 : { *(.stab.exclstr) }
  46. .stab.index 0 : { *(.stab.index) }
  47. .stab.indexstr 0 : { *(.stab.indexstr) }
  48. .comment 0 : { *(.comment) }
  49. /* DWARF debug sectio/ns.
  50. Symbols in the DWARF debugging sections are relative to the beginning
  51. of the section so we begin them at 0. */
  52. /* DWARF 1 */
  53. .debug 0 : { *(.debug) }
  54. .line 0 : { *(.line) }
  55. /* GNU DWARF 1 extensions */
  56. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  57. .debug_sfnames 0 : { *(.debug_sfnames) }
  58. /* DWARF 1.1 and DWARF 2 */
  59. .debug_aranges 0 : { *(.debug_aranges) }
  60. .debug_pubnames 0 : { *(.debug_pubnames) }
  61. /* DWARF 2 */
  62. .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
  63. .debug_abbrev 0 : { *(.debug_abbrev) }
  64. .debug_line 0 : { *(.debug_line) }
  65. .debug_frame 0 : { *(.debug_frame) }
  66. .debug_str 0 : { *(.debug_str) }
  67. .debug_loc 0 : { *(.debug_loc) }
  68. .debug_macinfo 0 : { *(.debug_macinfo) }
  69. /* SGI/MIPS DWARF 2 extensions */
  70. .debug_weaknames 0 : { *(.debug_weaknames) }
  71. .debug_funcnames 0 : { *(.debug_funcnames) }
  72. .debug_typenames 0 : { *(.debug_typenames) }
  73. .debug_varnames 0 : { *(.debug_varnames) }
  74. /DISCARD/ : { *(.note.GNU-stack) }
  75. /DISCARD/ : { *(.branch_lt) }
  76. /DISCARD/ : { *(.data .data.* .gnu.linkonce.d.*) }
  77. /DISCARD/ : { *(.bss .sbss .dynbss .dynsbss) }
  78. }
  79. PHDRS
  80. {
  81. text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */
  82. note PT_NOTE FLAGS(4); /* PF_R */
  83. dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
  84. eh_frame_hdr 0x6474e550; /* PT_GNU_EH_FRAME, but ld doesn't match the name */
  85. }
  86. /*
  87. * This controls what symbols we export from the DSO.
  88. */
  89. VERSION
  90. {
  91. VDSO_VERSION_STRING {
  92. global:
  93. __kernel_datapage_offset; /* Has to be there for the kernel to find */
  94. __kernel_get_syscall_map;
  95. __kernel_gettimeofday;
  96. __kernel_clock_gettime;
  97. __kernel_clock_getres;
  98. __kernel_get_tbfreq;
  99. __kernel_sync_dicache;
  100. __kernel_sync_dicache_p5;
  101. __kernel_sigtramp_rt64;
  102. local: *;
  103. };
  104. }