vdso32.lds.S 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * This is the infamous ld script for the 32 bits vdso library
  4. */
  5. #include <asm/vdso.h>
  6. #include <asm/page.h>
  7. /* Default link addresses for the vDSOs */
  8. OUTPUT_FORMAT("elf32-hppa-linux")
  9. OUTPUT_ARCH(hppa)
  10. ENTRY(_start)
  11. SECTIONS
  12. {
  13. . = VDSO_LBASE + SIZEOF_HEADERS;
  14. .hash : { *(.hash) } :text
  15. .gnu.hash : { *(.gnu.hash) }
  16. .dynsym : { *(.dynsym) }
  17. .dynstr : { *(.dynstr) }
  18. .gnu.version : { *(.gnu.version) }
  19. .gnu.version_d : { *(.gnu.version_d) }
  20. .gnu.version_r : { *(.gnu.version_r) }
  21. .note : { *(.note.*) } :text :note
  22. . = ALIGN (16);
  23. .text :
  24. {
  25. *(.text .stub .text.* .gnu.linkonce.t.*)
  26. }
  27. PROVIDE (__etext = .);
  28. PROVIDE (_etext = .);
  29. PROVIDE (etext = .);
  30. /* Other stuff is appended to the text segment: */
  31. .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
  32. .rodata1 : { *(.rodata1) }
  33. .rodata2 : { *(.data.rel.ro) }
  34. .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr
  35. .eh_frame : { KEEP (*(.eh_frame)) } :text
  36. .gcc_except_table : { *(.gcc_except_table) }
  37. .fixup : { *(.fixup) }
  38. .dynamic : { *(.dynamic) } :text :dynamic
  39. .plt : { *(.plt) }
  40. .got : { *(.got) }
  41. _end = .;
  42. __end = .;
  43. PROVIDE (end = .);
  44. /* Stabs debugging sections are here too
  45. */
  46. .stab 0 : { *(.stab) }
  47. .stabstr 0 : { *(.stabstr) }
  48. .stab.excl 0 : { *(.stab.excl) }
  49. .stab.exclstr 0 : { *(.stab.exclstr) }
  50. .stab.index 0 : { *(.stab.index) }
  51. .stab.indexstr 0 : { *(.stab.indexstr) }
  52. .comment 0 : { *(.comment) }
  53. .debug 0 : { *(.debug) }
  54. .line 0 : { *(.line) }
  55. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  56. .debug_sfnames 0 : { *(.debug_sfnames) }
  57. .debug_aranges 0 : { *(.debug_aranges) }
  58. .debug_pubnames 0 : { *(.debug_pubnames) }
  59. .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
  60. .debug_abbrev 0 : { *(.debug_abbrev) }
  61. .debug_line 0 : { *(.debug_line) }
  62. .debug_frame 0 : { *(.debug_frame) }
  63. .debug_str 0 : { *(.debug_str) }
  64. .debug_loc 0 : { *(.debug_loc) }
  65. .debug_macinfo 0 : { *(.debug_macinfo) }
  66. .debug_weaknames 0 : { *(.debug_weaknames) }
  67. .debug_funcnames 0 : { *(.debug_funcnames) }
  68. .debug_typenames 0 : { *(.debug_typenames) }
  69. .debug_varnames 0 : { *(.debug_varnames) }
  70. /DISCARD/ : { *(.note.GNU-stack) }
  71. /DISCARD/ : { *(.data .data.* .gnu.linkonce.d.* .sdata*) }
  72. /DISCARD/ : { *(.bss .sbss .dynbss .dynsbss) }
  73. }
  74. PHDRS
  75. {
  76. text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */
  77. note PT_NOTE FLAGS(4); /* PF_R */
  78. dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
  79. eh_frame_hdr PT_GNU_EH_FRAME;
  80. }
  81. /*
  82. * This controls what symbols we export from the DSO.
  83. */
  84. VERSION
  85. {
  86. VDSO_VERSION_STRING {
  87. global:
  88. __kernel_sigtramp_rt32;
  89. __kernel_restart_syscall32;
  90. local: *;
  91. };
  92. }