link.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /* Copyright (C) 2005-2019 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. <http://www.gnu.org/licenses/>. */
  14. #ifndef _LINK_H
  15. # error "Never include <bits/link.h> directly; use <link.h> instead."
  16. #endif
  17. #include <sgidefs.h>
  18. #if _MIPS_SIM == _ABIO32
  19. /* Registers for entry into PLT on MIPS. */
  20. typedef struct La_mips_32_regs
  21. {
  22. uint32_t lr_reg[4]; /* $a0 through $a3 */
  23. double lr_fpreg[2]; /* $f12 and $f14 */
  24. uint32_t lr_ra;
  25. uint32_t lr_sp;
  26. } La_mips_32_regs;
  27. /* Return values for calls from PLT on MIPS. */
  28. typedef struct La_mips_32_retval
  29. {
  30. uint32_t lrv_v0;
  31. uint32_t lrv_v1;
  32. double lrv_f0;
  33. double lrv_f2;
  34. } La_mips_32_retval;
  35. #else
  36. typedef struct La_mips_64_regs
  37. {
  38. uint64_t lr_reg[8]; /* $a0 through $a7 */
  39. double lr_fpreg[8]; /* $f12 throgh $f19 */
  40. uint64_t lr_ra;
  41. uint64_t lr_sp;
  42. } La_mips_64_regs;
  43. /* Return values for calls from PLT on MIPS. */
  44. typedef struct La_mips_64_retval
  45. {
  46. uint64_t lrv_v0;
  47. uint64_t lrv_v1;
  48. double lrv_f0;
  49. double lrv_f2;
  50. } La_mips_64_retval;
  51. #endif
  52. __BEGIN_DECLS
  53. #if _MIPS_SIM == _ABIO32
  54. extern Elf32_Addr la_mips_o32_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
  55. uintptr_t *__refcook,
  56. uintptr_t *__defcook,
  57. La_mips_32_regs *__regs,
  58. unsigned int *__flags,
  59. const char *__symname,
  60. long int *__framesizep);
  61. extern unsigned int la_mips_o32_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
  62. uintptr_t *__refcook,
  63. uintptr_t *__defcook,
  64. const La_mips_32_regs *__inregs,
  65. La_mips_32_retval *__outregs,
  66. const char *__symname);
  67. #elif _MIPS_SIM == _ABIN32
  68. extern Elf32_Addr la_mips_n32_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
  69. uintptr_t *__refcook,
  70. uintptr_t *__defcook,
  71. La_mips_64_regs *__regs,
  72. unsigned int *__flags,
  73. const char *__symname,
  74. long int *__framesizep);
  75. extern unsigned int la_mips_n32_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
  76. uintptr_t *__refcook,
  77. uintptr_t *__defcook,
  78. const La_mips_64_regs *__inregs,
  79. La_mips_64_retval *__outregs,
  80. const char *__symname);
  81. #else
  82. extern Elf64_Addr la_mips_n64_gnu_pltenter (Elf64_Sym *__sym, unsigned int __ndx,
  83. uintptr_t *__refcook,
  84. uintptr_t *__defcook,
  85. La_mips_64_regs *__regs,
  86. unsigned int *__flags,
  87. const char *__symname,
  88. long int *__framesizep);
  89. extern unsigned int la_mips_n64_gnu_pltexit (Elf64_Sym *__sym, unsigned int __ndx,
  90. uintptr_t *__refcook,
  91. uintptr_t *__defcook,
  92. const La_mips_64_regs *__inregs,
  93. La_mips_64_retval *__outregs,
  94. const char *__symname);
  95. #endif
  96. __END_DECLS