aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-03-21 17:14:49 -0700
committerH.J. Lu <hjl.tools@gmail.com>2012-03-21 17:14:49 -0700
commitc8e43ba739d696b3ff9a7b71786de8fab92950bc (patch)
tree74c34c4a6c88aa8adce8a4e5524e0fd89aff3121 /sysdeps
parentdcb33988382dd79655cc9efbafe2981de0be5d12 (diff)
downloadglibc-c8e43ba739d696b3ff9a7b71786de8fab92950bc.tar.xz
glibc-c8e43ba739d696b3ff9a7b71786de8fab92950bc.zip
Add x32 support to dynamic linker audit
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/ldsodefs.h9
-rw-r--r--sysdeps/x86_64/bits/link.h20
2 files changed, 28 insertions, 1 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index f4531b412a..d4cbabab51 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -225,6 +225,10 @@ struct audit_ifaces
uintptr_t *, struct La_x86_64_regs *,
unsigned int *, const char *name,
long int *framesizep);
+ Elf32_Addr (*x32_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *,
+ uintptr_t *, struct La_x32_regs *,
+ unsigned int *, const char *name,
+ long int *framesizep);
Elf32_Addr (*ppc32_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *,
uintptr_t *, struct La_ppc32_regs *,
unsigned int *, const char *name,
@@ -269,6 +273,11 @@ struct audit_ifaces
const struct La_x86_64_regs *,
struct La_x86_64_retval *,
const char *);
+ unsigned int (*x32_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *,
+ uintptr_t *,
+ const struct La_x32_regs *,
+ struct La_x86_64_retval *,
+ const char *);
unsigned int (*ppc32_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *,
uintptr_t *,
const struct La_ppc32_regs *,
diff --git a/sysdeps/x86_64/bits/link.h b/sysdeps/x86_64/bits/link.h
index c79eda846d..fa2091085f 100644
--- a/sysdeps/x86_64/bits/link.h
+++ b/sysdeps/x86_64/bits/link.h
@@ -20,7 +20,7 @@
#endif
-#if __ELF_NATIVE_CLASS == 32
+#ifndef __x86_64__
/* Registers for entry into PLT on IA-32. */
typedef struct La_i86_regs
{
@@ -105,6 +105,8 @@ typedef struct La_x86_64_retval
La_x86_64_vector lrv_vector1;
} La_x86_64_retval;
+#define La_x32_regs La_x86_64_regs
+#define La_x32_retval La_x86_64_retval
__BEGIN_DECLS
@@ -124,6 +126,22 @@ extern unsigned int la_x86_64_gnu_pltexit (Elf64_Sym *__sym,
La_x86_64_retval *__outregs,
const char *__symname);
+extern Elf32_Addr la_x32_gnu_pltenter (Elf32_Sym *__sym,
+ unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ La_x32_regs *__regs,
+ unsigned int *__flags,
+ const char *__symname,
+ long int *__framesizep);
+extern unsigned int la_x32_gnu_pltexit (Elf32_Sym *__sym,
+ unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ const La_x32_regs *__inregs,
+ La_x32_retval *__outregs,
+ const char *__symname);
+
__END_DECLS
#endif