diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-11-06 09:27:41 -0800 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-11-06 09:27:41 -0800 |
commit | 872873d48d5d96879a2dd8c249e688e73a5dd554 (patch) | |
tree | 132682d634bdb0b4f85fa895a6b701ab48b6cc71 /sysdeps/powerpc | |
parent | 34df851b3364e14133b865574dbc5f2a8b88874e (diff) | |
download | glibc-872873d48d5d96879a2dd8c249e688e73a5dd554.tar.gz glibc-872873d48d5d96879a2dd8c249e688e73a5dd554.tar.xz glibc-872873d48d5d96879a2dd8c249e688e73a5dd554.zip |
Fix R_PPC64_{JMP_IREL,IRELATIVE} handling in dl-conflict.c.
I've just committed STT_GNU_IFUNC ppc/ppc64 support into prelink, and this patch is needed on the glibc side. Without it ld.so segfaults, as in dl-conflict.c sym_map is always NULL. While dl-machine.h could use RESOLVE_CONFLICT_FIND_MAP macro to compute it, it doesn't make sense, because with prelink we know it is already properly relocated (all relative relocations are applied by prelink).
Diffstat (limited to 'sysdeps/powerpc')
-rw-r--r-- | sysdeps/powerpc/powerpc64/dl-machine.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sysdeps/powerpc/powerpc64/dl-machine.h b/sysdeps/powerpc/powerpc64/dl-machine.h index 8a720ae9c2..00888587af 100644 --- a/sysdeps/powerpc/powerpc64/dl-machine.h +++ b/sysdeps/powerpc/powerpc64/dl-machine.h @@ -531,13 +531,14 @@ auto inline Elf64_Addr __attribute__ ((always_inline)) resolve_ifunc (Elf64_Addr value, const struct link_map *map, const struct link_map *sym_map) { +#ifndef RESOLVE_CONFLICT_FIND_MAP /* The function we are calling may not yet have its opd entry relocated. */ Elf64_FuncDesc opd; if (map != sym_map -#if !defined RTLD_BOOTSTRAP && defined SHARED +# if !defined RTLD_BOOTSTRAP && defined SHARED /* Bootstrap map doesn't have l_relocated set for it. */ && sym_map != &GL(dl_rtld_map) -#endif +# endif && !sym_map->l_relocated) { Elf64_FuncDesc *func = (Elf64_FuncDesc *) value; @@ -546,6 +547,7 @@ resolve_ifunc (Elf64_Addr value, opd.fd_aux = func->fd_aux; value = (Elf64_Addr) &opd; } +#endif return ((Elf64_Addr (*) (void)) value) (); } |