aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/rtld.c1
-rw-r--r--elf/tst-auditmod1.c24
2 files changed, 25 insertions, 0 deletions
diff --git a/elf/rtld.c b/elf/rtld.c
index 1d08c93..c9ed64a 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -263,6 +263,7 @@ _dl_start_final (void *arg, struct dl_start_final_info *info)
memcpy (GL(dl_rtld_map).l_info, info->l.l_info,
sizeof GL(dl_rtld_map).l_info);
GL(dl_rtld_map).l_mach = info->l.l_mach;
+ GL(dl_rtld_map).l_relocated = 1;
#endif
_dl_setup_hash (&GL(dl_rtld_map));
GL(dl_rtld_map).l_real = &GL(dl_rtld_map);
diff --git a/elf/tst-auditmod1.c b/elf/tst-auditmod1.c
index 7d39857..987a548 100644
--- a/elf/tst-auditmod1.c
+++ b/elf/tst-auditmod1.c
@@ -4,6 +4,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <bits/wordsize.h>
#include <gnu/lib-names.h>
@@ -147,6 +148,29 @@ la_x86_64_gnu_pltexit (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
return 0;
}
+#elif defined __powerpc__ && __WORDSIZE == 64
+uintptr_t
+la_ppc64_gnu_pltenter (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
+ uintptr_t *defcook, La_ppc64_regs *regs,
+ unsigned int *flags, const char *symname,
+ long int *framesizep)
+{
+ printf ("ppc64_pltenter: symname=%s, st_value=%#lx, ndx=%u, flags=%u\n",
+ symname, (long int) sym->st_value, ndx, *flags);
+
+ return sym->st_value;
+}
+
+unsigned int
+la_ppc64_gnu_pltexit (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
+ uintptr_t *defcook, const La_ppc64_regs *inregs,
+ La_ppc64_retval *outregs, const char *symname)
+{
+ printf ("ppc64_pltexit: symname=%s, st_value=%#lx, ndx=%u, retval=%tu\n",
+ symname, (long int) sym->st_value, ndx, outregs->lrv_r3);
+
+ return 0;
+}
#else
# error "architecture specific code needed"
#endif