Back to index

glibc  2.9
link.h
Go to the documentation of this file.
00001 /* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Lesser General Public License for more details.
00013 
00014    You should have received a copy of the GNU Lesser General Public
00015    License along with the GNU C Library; if not, write to the Free
00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00017    02111-1307 USA.  */
00018 
00019 #ifndef       _LINK_H
00020 # error "Never include <bits/link.h> directly; use <link.h> instead."
00021 #endif
00022 
00023 
00024 #if __ELF_NATIVE_CLASS == 32
00025 /* Registers for entry into PLT on IA-32.  */
00026 typedef struct La_i86_regs
00027 {
00028   uint32_t lr_edx;
00029   uint32_t lr_ecx;
00030   uint32_t lr_eax;
00031   uint32_t lr_ebp;
00032   uint32_t lr_esp;
00033 } La_i86_regs;
00034 
00035 /* Return values for calls from PLT on IA-32.  */
00036 typedef struct La_i86_retval
00037 {
00038   uint32_t lrv_eax;
00039   uint32_t lrv_edx;
00040   long double lrv_st0;
00041   long double lrv_st1;
00042 } La_i86_retval;
00043 
00044 
00045 __BEGIN_DECLS
00046 
00047 extern Elf32_Addr la_i86_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
00048                                    uintptr_t *__refcook,
00049                                    uintptr_t *__defcook,
00050                                    La_i86_regs *__regs,
00051                                    unsigned int *__flags,
00052                                    const char *__symname,
00053                                    long int *__framesizep);
00054 extern unsigned int la_i86_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
00055                                    uintptr_t *__refcook,
00056                                    uintptr_t *__defcook,
00057                                    const La_i86_regs *__inregs,
00058                                    La_i86_retval *__outregs,
00059                                    const char *symname);
00060 
00061 __END_DECLS
00062 
00063 #else
00064 
00065 /* Registers for entry into PLT on x86-64.  */
00066 # if __GNUC_PREREQ (4,0)
00067 typedef float La_x86_64_xmm __attribute__ ((__vector_size__ (16)));
00068 # else
00069 typedef float La_x86_64_xmm __attribute__ ((__mode__ (__V4SF__)));
00070 # endif
00071 
00072 typedef struct La_x86_64_regs
00073 {
00074   uint64_t lr_rdx;
00075   uint64_t lr_r8;
00076   uint64_t lr_r9;
00077   uint64_t lr_rcx;
00078   uint64_t lr_rsi;
00079   uint64_t lr_rdi;
00080   uint64_t lr_rbp;
00081   uint64_t lr_rsp;
00082   La_x86_64_xmm lr_xmm[8];
00083 } La_x86_64_regs;
00084 
00085 /* Return values for calls from PLT on x86-64.  */
00086 typedef struct La_x86_64_retval
00087 {
00088   uint64_t lrv_rax;
00089   uint64_t lrv_rdx;
00090   La_x86_64_xmm lrv_xmm0;
00091   La_x86_64_xmm lrv_xmm1;
00092   long double lrv_st0;
00093   long double lrv_st1;
00094 } La_x86_64_retval;
00095 
00096 
00097 __BEGIN_DECLS
00098 
00099 extern Elf64_Addr la_x86_64_gnu_pltenter (Elf64_Sym *__sym,
00100                                      unsigned int __ndx,
00101                                      uintptr_t *__refcook,
00102                                      uintptr_t *__defcook,
00103                                      La_x86_64_regs *__regs,
00104                                      unsigned int *__flags,
00105                                      const char *__symname,
00106                                      long int *__framesizep);
00107 extern unsigned int la_x86_64_gnu_pltexit (Elf64_Sym *__sym,
00108                                       unsigned int __ndx,
00109                                       uintptr_t *__refcook,
00110                                       uintptr_t *__defcook,
00111                                       const La_x86_64_regs *__inregs,
00112                                       La_x86_64_retval *__outregs,
00113                                       const char *symname);
00114 
00115 __END_DECLS
00116 
00117 #endif