vdso32.lds.S 3.1 KB

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