link.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* Machine-specific declarations for dynamic linker interface. RISC-V version.
  2. Copyright (C) 2005-2026 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with the GNU C Library. If not, see
  14. <https://www.gnu.org/licenses/>. */
  15. #ifndef _LINK_H
  16. # error "Never include <bits/link.h> directly; use <link.h> instead."
  17. #endif
  18. typedef struct La_riscv_regs
  19. {
  20. unsigned long int lr_reg[8]; /* a0 - a7 */
  21. double lr_fpreg[8]; /* fa0 - fa7 */
  22. unsigned long int lr_ra;
  23. unsigned long int lr_sp;
  24. } La_riscv_regs;
  25. /* Return values for calls from PLT on RISC-V. */
  26. typedef struct La_riscv_retval
  27. {
  28. unsigned long int lrv_a0;
  29. unsigned long int lrv_a1;
  30. double lrv_fa0;
  31. double lrv_fa1;
  32. } La_riscv_retval;
  33. __BEGIN_DECLS
  34. extern ElfW(Addr) la_riscv_gnu_pltenter (ElfW(Sym) *__sym, unsigned int __ndx,
  35. uintptr_t *__refcook,
  36. uintptr_t *__defcook,
  37. La_riscv_regs *__regs,
  38. unsigned int *__flags,
  39. const char *__symname,
  40. long int *__framesizep);
  41. extern unsigned int la_riscv_gnu_pltexit (ElfW(Sym) *__sym, unsigned int __ndx,
  42. uintptr_t *__refcook,
  43. uintptr_t *__defcook,
  44. const La_riscv_regs *__inregs,
  45. La_riscv_retval *__outregs,
  46. const char *__symname);
  47. __END_DECLS