link.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* Declarations for dynamic linker interface. OpenRISC version.
  2. Copyright (C) 2022-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. /* Registers for entry into PLT. */
  19. typedef struct La_or1k_regs
  20. {
  21. uint32_t lr_reg[6]; /* Args passed in r3-r8. */
  22. uint32_t lr_sp; /* Register r1. */
  23. uint32_t lr_lr; /* Register r9. */
  24. } La_or1k_regs;
  25. /* Return values for calls from PLT. */
  26. typedef struct La_or1k_retval
  27. {
  28. /* Up to two 32-bit registers used for a return value. */
  29. uint32_t lrv_reg[2];
  30. } La_or1k_retval;
  31. __BEGIN_DECLS
  32. extern Elf32_Addr la_or1k_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
  33. uintptr_t *__refcook,
  34. uintptr_t *__defcook,
  35. La_or1k_regs *__regs,
  36. unsigned int *__flags,
  37. const char *__symname,
  38. long int *__framesizep);
  39. extern unsigned int la_or1k_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
  40. uintptr_t *__refcook,
  41. uintptr_t *__defcook,
  42. const La_or1k_regs *__inregs,
  43. La_or1k_retval *__outregs,
  44. const char *__symname);
  45. __END_DECLS