vdso64.lds.S 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * This is the infamous ld script for the 64 bits vdso library
  4. */
  5. #include <asm/vdso.h>
  6. /* Default link addresses for the vDSOs */
  7. OUTPUT_FORMAT("elf64-hppa-linux")
  8. OUTPUT_ARCH(hppa:hppa2.0w)
  9. ENTRY(_start)
  10. SECTIONS
  11. {
  12. . = VDSO_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. /* 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. .fixup : { *(.fixup) }
  36. .dynamic : { *(.dynamic) } :text :dynamic
  37. .plt : { *(.plt) }
  38. .got : { *(.got) }
  39. _end = .;
  40. __end = .;
  41. PROVIDE (end = .);
  42. /* Stabs debugging sections are here too
  43. */
  44. .stab 0 : { *(.stab) }
  45. .stabstr 0 : { *(.stabstr) }
  46. .stab.excl 0 : { *(.stab.excl) }
  47. .stab.exclstr 0 : { *(.stab.exclstr) }
  48. .stab.index 0 : { *(.stab.index) }
  49. .stab.indexstr 0 : { *(.stab.indexstr) }
  50. .comment 0 : { *(.comment) }
  51. .debug 0 : { *(.debug) }
  52. .line 0 : { *(.line) }
  53. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  54. .debug_sfnames 0 : { *(.debug_sfnames) }
  55. .debug_aranges 0 : { *(.debug_aranges) }
  56. .debug_pubnames 0 : { *(.debug_pubnames) }
  57. .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
  58. .debug_abbrev 0 : { *(.debug_abbrev) }
  59. .debug_line 0 : { *(.debug_line) }
  60. .debug_frame 0 : { *(.debug_frame) }
  61. .debug_str 0 : { *(.debug_str) }
  62. .debug_loc 0 : { *(.debug_loc) }
  63. .debug_macinfo 0 : { *(.debug_macinfo) }
  64. .debug_weaknames 0 : { *(.debug_weaknames) }
  65. .debug_funcnames 0 : { *(.debug_funcnames) }
  66. .debug_typenames 0 : { *(.debug_typenames) }
  67. .debug_varnames 0 : { *(.debug_varnames) }
  68. /DISCARD/ : { *(.note.GNU-stack) }
  69. /DISCARD/ : { *(.data .data.* .gnu.linkonce.d.* .sdata*) }
  70. /DISCARD/ : { *(.bss .sbss .dynbss .dynsbss) }
  71. }
  72. PHDRS
  73. {
  74. text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */
  75. note PT_NOTE FLAGS(4); /* PF_R */
  76. dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
  77. eh_frame_hdr PT_GNU_EH_FRAME;
  78. }
  79. /*
  80. * This controls what symbols we export from the DSO.
  81. */
  82. VERSION
  83. {
  84. VDSO_VERSION_STRING {
  85. global:
  86. __kernel_sigtramp_rt64;
  87. __kernel_restart_syscall64;
  88. local: *;
  89. };
  90. }