link.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. /* Copyright (C) 2005-2026 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3. The GNU C Library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Lesser General Public
  5. License as published by the Free Software Foundation; either
  6. version 2.1 of the License, or (at your option) any later version.
  7. The GNU C Library is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public
  12. License along with the GNU C Library; if not, see
  13. <https://www.gnu.org/licenses/>. */
  14. #ifndef _LINK_H
  15. # error "Never include <bits/link.h> directly; use <link.h> instead."
  16. #endif
  17. #if defined HAVE_S390_VX_ASM_SUPPORT
  18. typedef char La_s390_vr[16];
  19. #endif
  20. #if __ELF_NATIVE_CLASS == 32
  21. /* Registers for entry into PLT on s390-32. */
  22. typedef struct La_s390_32_regs
  23. {
  24. uint32_t lr_r2;
  25. uint32_t lr_r3;
  26. uint32_t lr_r4;
  27. uint32_t lr_r5;
  28. uint32_t lr_r6;
  29. double lr_fp0;
  30. double lr_fp2;
  31. # if defined HAVE_S390_VX_ASM_SUPPORT
  32. La_s390_vr lr_v24;
  33. La_s390_vr lr_v25;
  34. La_s390_vr lr_v26;
  35. La_s390_vr lr_v27;
  36. La_s390_vr lr_v28;
  37. La_s390_vr lr_v29;
  38. La_s390_vr lr_v30;
  39. La_s390_vr lr_v31;
  40. # endif
  41. } La_s390_32_regs;
  42. /* Return values for calls from PLT on s390-32. */
  43. typedef struct La_s390_32_retval
  44. {
  45. uint32_t lrv_r2;
  46. uint32_t lrv_r3;
  47. double lrv_fp0;
  48. # if defined HAVE_S390_VX_ASM_SUPPORT
  49. La_s390_vr lrv_v24;
  50. # endif
  51. } La_s390_32_retval;
  52. __BEGIN_DECLS
  53. extern Elf32_Addr la_s390_32_gnu_pltenter (Elf32_Sym *__sym,
  54. unsigned int __ndx,
  55. uintptr_t *__refcook,
  56. uintptr_t *__defcook,
  57. La_s390_32_regs *__regs,
  58. unsigned int *__flags,
  59. const char *__symname,
  60. long int *__framesizep);
  61. extern unsigned int la_s390_32_gnu_pltexit (Elf32_Sym *__sym,
  62. unsigned int __ndx,
  63. uintptr_t *__refcook,
  64. uintptr_t *__defcook,
  65. const La_s390_32_regs *__inregs,
  66. La_s390_32_retval *__outregs,
  67. const char *symname);
  68. __END_DECLS
  69. #else
  70. /* Registers for entry into PLT on s390-64. */
  71. typedef struct La_s390_64_regs
  72. {
  73. uint64_t lr_r2;
  74. uint64_t lr_r3;
  75. uint64_t lr_r4;
  76. uint64_t lr_r5;
  77. uint64_t lr_r6;
  78. double lr_fp0;
  79. double lr_fp2;
  80. double lr_fp4;
  81. double lr_fp6;
  82. # if defined HAVE_S390_VX_ASM_SUPPORT
  83. La_s390_vr lr_v24;
  84. La_s390_vr lr_v25;
  85. La_s390_vr lr_v26;
  86. La_s390_vr lr_v27;
  87. La_s390_vr lr_v28;
  88. La_s390_vr lr_v29;
  89. La_s390_vr lr_v30;
  90. La_s390_vr lr_v31;
  91. # endif
  92. } La_s390_64_regs;
  93. /* Return values for calls from PLT on s390-64. */
  94. typedef struct La_s390_64_retval
  95. {
  96. uint64_t lrv_r2;
  97. double lrv_fp0;
  98. # if defined HAVE_S390_VX_ASM_SUPPORT
  99. La_s390_vr lrv_v24;
  100. # endif
  101. } La_s390_64_retval;
  102. __BEGIN_DECLS
  103. extern Elf64_Addr la_s390_64_gnu_pltenter (Elf64_Sym *__sym,
  104. unsigned int __ndx,
  105. uintptr_t *__refcook,
  106. uintptr_t *__defcook,
  107. La_s390_64_regs *__regs,
  108. unsigned int *__flags,
  109. const char *__symname,
  110. long int *__framesizep);
  111. extern unsigned int la_s390_64_gnu_pltexit (Elf64_Sym *__sym,
  112. unsigned int __ndx,
  113. uintptr_t *__refcook,
  114. uintptr_t *__defcook,
  115. const La_s390_64_regs *__inregs,
  116. La_s390_64_retval *__outregs,
  117. const char *__symname);
  118. __END_DECLS
  119. #endif