zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

link.h (2054B) - Raw


      1 /* Copyright (C) 2005-2025 Free Software Foundation, Inc.
      2 
      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 License as
      7    published by the Free Software Foundation; either version 2.1 of the
      8    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 typedef union
     24 {
     25   float s;
     26   double d;
     27   long double q;
     28 } La_aarch64_vector;
     29 
     30 /* Registers for entry into PLT on AArch64.  */
     31 typedef struct La_aarch64_regs
     32 {
     33   uint64_t          lr_xreg[9];
     34   La_aarch64_vector lr_vreg[8];
     35   uint64_t          lr_sp;
     36   uint64_t          lr_lr;
     37   void              *lr_vpcs;
     38 } La_aarch64_regs;
     39 
     40 /* Return values for calls from PLT on AArch64.  */
     41 typedef struct La_aarch64_retval
     42 {
     43   /* Up to eight integer registers can be used for a return value.  */
     44   uint64_t          lrv_xreg[8];
     45   /* Up to eight V registers can be used for a return value.  */
     46   La_aarch64_vector lrv_vreg[8];
     47   void              *lrv_vpcs;
     48 } La_aarch64_retval;
     49 __BEGIN_DECLS
     50 
     51 extern ElfW(Addr)
     52 la_aarch64_gnu_pltenter (ElfW(Sym) *__sym, unsigned int __ndx,
     53 			 uintptr_t *__refcook,
     54 			 uintptr_t *__defcook,
     55 			 La_aarch64_regs *__regs,
     56 			 unsigned int *__flags,
     57 			 const char *__symname,
     58 			 long int *__framesizep);
     59 
     60 extern unsigned int
     61 la_aarch64_gnu_pltexit (ElfW(Sym) *__sym, unsigned int __ndx,
     62 			uintptr_t *__refcook,
     63 			uintptr_t *__defcook,
     64 			const La_aarch64_regs *__inregs,
     65 			La_aarch64_retval *__outregs,
     66 			const char *__symname);
     67 
     68 __END_DECLS