vdso64.lds.S 3.4 KB

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