zig

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

link.h (2207B) - Raw


      1 /* Copyright (C) 2005-2025 Free Software Foundation, Inc.
      2    This file is part of the GNU C Library.
      3 
      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 
      9    The GNU C Library is distributed in the hope that it will be useful,
     10    but WITHOUT ANY WARRANTY; without even the implied warranty of
     11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     12    Lesser General Public License for more details.
     13 
     14    You should have received a copy of the GNU Lesser General Public
     15    License along with the GNU C Library.  If not, see
     16    <https://www.gnu.org/licenses/>.  */
     17 
     18 #ifndef	_LINK_H
     19 # error "Never include <bits/link.h> directly; use <link.h> instead."
     20 #endif
     21 
     22 
     23 /* Registers for entry into PLT on ARM.  */
     24 typedef struct La_arm_regs
     25 {
     26   uint32_t lr_reg[4];
     27   uint32_t lr_sp;
     28   uint32_t lr_lr;
     29   /* Coprocessor registers used for argument passing.  The data
     30      stored here depends on the coprocessors available in the
     31      system which are used for function calls in the current ABI.
     32      VFP uses eight 64-bit registers, and iWMMXt uses ten.  */
     33   uint32_t lr_coproc[42];
     34 } La_arm_regs;
     35 
     36 /* Return values for calls from PLT on ARM.  */
     37 typedef struct La_arm_retval
     38 {
     39   /* Up to four integer registers can be used for a return value in
     40      some ABIs (APCS complex long double).  */
     41   uint32_t lrv_reg[4];
     42 
     43   /* Any coprocessor registers which might be used to return values
     44      in the current ABI.  */
     45   uint32_t lrv_coproc[12];
     46 } La_arm_retval;
     47 
     48 
     49 __BEGIN_DECLS
     50 
     51 extern Elf32_Addr la_arm_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
     52 				       uintptr_t *__refcook,
     53 				       uintptr_t *__defcook,
     54 				       La_arm_regs *__regs,
     55 				       unsigned int *__flags,
     56 				       const char *__symname,
     57 				       long int *__framesizep);
     58 extern unsigned int la_arm_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
     59 					uintptr_t *__refcook,
     60 					uintptr_t *__defcook,
     61 					const La_arm_regs *__inregs,
     62 					La_arm_retval *__outregs,
     63 					const char *__symname);
     64 
     65 __END_DECLS