From c8e43ba739d696b3ff9a7b71786de8fab92950bc Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 21 Mar 2012 17:14:49 -0700 Subject: Add x32 support to dynamic linker audit --- elf/tst-auditmod4b.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'elf/tst-auditmod4b.c') diff --git a/elf/tst-auditmod4b.c b/elf/tst-auditmod4b.c index 761d97ce9d..75e85582bd 100644 --- a/elf/tst-auditmod4b.c +++ b/elf/tst-auditmod4b.c @@ -94,10 +94,17 @@ la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook, return sym->st_value; } -#define pltenter la_x86_64_gnu_pltenter -#define pltexit la_x86_64_gnu_pltexit -#define La_regs La_x86_64_regs -#define La_retval La_x86_64_retval +#ifdef __LP64__ +# define pltenter la_x86_64_gnu_pltenter +# define pltexit la_x86_64_gnu_pltexit +# define La_regs La_x86_64_regs +# define La_retval La_x86_64_retval +#else +# define pltenter la_x32_gnu_pltenter +# define pltexit la_x32_gnu_pltexit +# define La_regs La_x32_regs +# define La_retval La_x32_retval +#endif #define int_retval lrv_rax #include @@ -177,7 +184,8 @@ pltexit (ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook, const char *symname) { printf ("pltexit: symname=%s, st_value=%#lx, ndx=%u, retval=%tu\n", - symname, (long int) sym->st_value, ndx, outregs->int_retval); + symname, (long int) sym->st_value, ndx, + (ptrdiff_t) outregs->int_retval); #ifdef __AVX__ if (check_avx () && strcmp (symname, "audit_test") == 0) -- cgit v1.2.3