1/* Machine-specific audit interfaces for dynamic linker.  SPARC version.
 2   Copyright (C) 2005-2025 Free Software Foundation, Inc.
 3   This file is part of the GNU C Library.
 4
 5   The GNU C Library is free software; you can redistribute it and/or
 6   modify it under the terms of the GNU Lesser General Public
 7   License as published by the Free Software Foundation; either
 8   version 2.1 of the License, or (at your option) any later version.
 9
10   The GNU C Library is distributed in the hope that it will be useful,
11   but WITHOUT ANY WARRANTY; without even the implied warranty of
12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13   Lesser General Public License for more details.
14
15   You should have received a copy of the GNU Lesser General Public
16   License along with the GNU C Library; if not, see
17   <https://www.gnu.org/licenses/>.  */
18
19#ifndef	_LINK_H
20# error "Never include <bits/link.h> directly; use <link.h> instead."
21#endif
22
23#if __WORDSIZE == 32
24
25typedef struct La_sparc32_regs
26{
27  uint32_t lr_lreg[8];  /* %l0 through %l7 */
28  uint32_t lr_reg[6];   /* %o0 through %o5 */
29  uint32_t lr_sp;       /* %o6 */
30  uint32_t lr_ra;       /* %o7 */
31  uint32_t lr_struct;   /* Pass-by-reference struct pointer */
32} La_sparc32_regs;
33
34typedef struct La_sparc32_retval
35{
36  uint32_t lrv_reg[2]; /* %o0 and %o1 */
37  double lrv_fpreg[2]; /* %f0 and %f2 */
38} La_sparc32_retval;
39
40#else
41
42typedef struct La_sparc64_regs
43{
44  uint64_t lr_lreg[8];  /* %l0 through %l7 */
45  uint64_t lr_reg[6];	/* %o0 through %o5 */
46  uint64_t lr_sp;	/* %o6 */
47  uint64_t lr_ra;	/* %o7 */
48  double lr_fpreg[16];	/* %f0 through %f30 */
49} La_sparc64_regs;
50
51typedef struct La_sparc64_retval
52{
53  uint64_t lrv_reg[4]; /* %o0 through %o3 */
54  double lrv_fprev[4]; /* %f0 through %f8 */
55} La_sparc64_retval;
56
57#endif
58
59__BEGIN_DECLS
60
61#if __WORDSIZE == 32
62
63extern Elf32_Addr la_sparc32_gnu_pltenter (Elf32_Sym *__sym,
64					   unsigned int __ndx,
65					   uintptr_t *__refcook,
66					   uintptr_t *__defcook,
67					   La_sparc32_regs *__regs,
68					   unsigned int *__flags,
69					   const char *__symname,
70					   long int *__framesizep);
71extern unsigned int la_sparc32_gnu_pltexit (Elf32_Sym *__sym,
72					    unsigned int __ndx,
73					    uintptr_t *__refcook,
74					    uintptr_t *__defcook,
75					     const La_sparc32_regs *__inregs,
76					    La_sparc32_retval *__outregs,
77					    const char *__symname);
78
79#else
80
81extern Elf64_Addr la_sparc64_gnu_pltenter (Elf64_Sym *__sym,
82					   unsigned int __ndx,
83					   uintptr_t *__refcook,
84					   uintptr_t *__defcook,
85					   La_sparc64_regs *__regs,
86					   unsigned int *__flags,
87					   const char *__symname,
88					   long int *__framesizep);
89extern unsigned int la_sparc64_gnu_pltexit (Elf64_Sym *__sym,
90					    unsigned int __ndx,
91					    uintptr_t *__refcook,
92					    uintptr_t *__defcook,
93					    const La_sparc64_regs *__inregs,
94					    La_sparc64_retval *__outregs,
95					    const char *__symname);
96
97#endif
98
99__END_DECLS