Back to index

glibc  2.9
link.h
Go to the documentation of this file.
00001 /* Machine-specific declarations for dynamic linker interface.  PowerPC version
00002    Copyright (C) 2004, 2005 Free Software Foundation, Inc.
00003    This file is part of the GNU C Library.
00004 
00005    The GNU C Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009 
00010    The GNU C Library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the GNU C Library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA.  */
00019 
00020 #ifndef       _LINK_H
00021 # error "Never include <bits/link.h> directly; use <link.h> instead."
00022 #endif
00023 
00024 
00025 #if __ELF_NATIVE_CLASS == 32
00026 
00027 /* Registers for entry into PLT on PPC32.  */
00028 typedef struct La_ppc32_regs
00029 {
00030   uint32_t lr_reg[8];
00031   double lr_fp[8];
00032   uint32_t lr_vreg[12][4];
00033   uint32_t lr_r1;
00034   uint32_t lr_lr;
00035 } La_ppc32_regs;
00036 
00037 /* Return values for calls from PLT on PPC32.  */
00038 typedef struct La_ppc32_retval
00039 {
00040   uint32_t lrv_r3;
00041   uint32_t lrv_r4;
00042   double lrv_fp[8];
00043   uint32_t lrv_v2[4];
00044 } La_ppc32_retval;
00045 
00046 
00047 __BEGIN_DECLS
00048 
00049 extern Elf32_Addr la_ppc32_gnu_pltenter (Elf32_Sym *__sym,
00050                                     unsigned int __ndx,
00051                                     uintptr_t *__refcook,
00052                                     uintptr_t *__defcook,
00053                                     La_ppc32_regs *__regs,
00054                                     unsigned int *__flags,
00055                                     const char *__symname,
00056                                     long int *__framesizep);
00057 extern unsigned int la_ppc32_gnu_pltexit (Elf32_Sym *__sym,
00058                                      unsigned int __ndx,
00059                                      uintptr_t *__refcook,
00060                                      uintptr_t *__defcook,
00061                                      const La_ppc32_regs *__inregs,
00062                                      La_ppc32_retval *__outregs,
00063                                      const char *symname);
00064 
00065 __END_DECLS
00066 
00067 #else
00068 
00069 /* Registers for entry into PLT on PPC64.  */
00070 typedef struct La_ppc64_regs
00071 {
00072   uint64_t lr_reg[8];
00073   double lr_fp[13];
00074   uint32_t __padding;
00075   uint32_t lr_vrsave;
00076   uint32_t lr_vreg[12][4];
00077   uint64_t lr_r1;
00078   uint64_t lr_lr;
00079 } La_ppc64_regs;
00080 
00081 /* Return values for calls from PLT on PPC64.  */
00082 typedef struct La_ppc64_retval
00083 {
00084   uint64_t lrv_r3;
00085   uint64_t lrv_r4;
00086   double lrv_fp[4];  /* f1-f4, float - complex long double.  */
00087   uint32_t lrv_v2[4];       /* v2.  */ 
00088 } La_ppc64_retval;
00089 
00090 
00091 __BEGIN_DECLS
00092 
00093 extern Elf64_Addr la_ppc64_gnu_pltenter (Elf64_Sym *__sym,
00094                                     unsigned int __ndx,
00095                                     uintptr_t *__refcook,
00096                                     uintptr_t *__defcook,
00097                                     La_ppc64_regs *__regs,
00098                                     unsigned int *__flags,
00099                                     const char *__symname,
00100                                     long int *__framesizep);
00101 extern unsigned int la_ppc64_gnu_pltexit (Elf64_Sym *__sym,
00102                                      unsigned int __ndx,
00103                                      uintptr_t *__refcook,
00104                                      uintptr_t *__defcook,
00105                                      const La_ppc64_regs *__inregs,
00106                                      La_ppc64_retval *__outregs,
00107                                      const char *symname);
00108 
00109 __END_DECLS
00110 
00111 #endif