summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libexec/rtld-elf/Makefile2
-rw-r--r--libexec/rtld-elf/ia64/reloc.c19
2 files changed, 16 insertions, 5 deletions
diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile
index a798f3a..62aaaab 100644
--- a/libexec/rtld-elf/Makefile
+++ b/libexec/rtld-elf/Makefile
@@ -34,7 +34,6 @@ LDFLAGS+= -shared -Wl,-Bsymbolic
DPADD= ${LIBC_PIC}
LDADD= -lc_pic -lssp_nonshared
-.if ${MACHINE_CPUARCH} != "ia64"
.if ${MK_SYMVER} == "yes"
LIBCDIR= ${.CURDIR}/../../lib/libc
VERSION_DEF= ${LIBCDIR}/Versions.def
@@ -48,7 +47,6 @@ ${PROG}: ${VERSION_MAP}
SYMBOL_MAPS+= ${.CURDIR}/${RTLD_ARCH}/Symbol.map
.endif
.endif
-.endif
.sinclude "${.CURDIR}/${RTLD_ARCH}/Makefile.inc"
diff --git a/libexec/rtld-elf/ia64/reloc.c b/libexec/rtld-elf/ia64/reloc.c
index 9a8d067..728fe30 100644
--- a/libexec/rtld-elf/ia64/reloc.c
+++ b/libexec/rtld-elf/ia64/reloc.c
@@ -195,9 +195,22 @@ reloc_non_plt_obj(Obj_Entry *obj_rtld, Obj_Entry *obj, const Elf_Rela *rela,
int sym_index;
def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj,
- false, cache);
- if (def == NULL)
- return -1;
+ true, cache);
+ if (def == NULL) {
+ /*
+ * XXX r_debug_state is problematic and find_symdef()
+ * returns NULL for it. This probably has something to
+ * do with symbol versioning (r_debug_state is in the
+ * symbol map). If we return -1 in that case we abort
+ * relocating rtld, which typically is fatal. So, for
+ * now just skip the symbol when we're relocating
+ * rtld. We don't care about r_debug_state unless we
+ * are being debugged.
+ */
+ if (obj != obj_rtld)
+ return -1;
+ break;
+ }
if (def->st_shndx != SHN_UNDEF) {
target = (Elf_Addr)(defobj->relocbase + def->st_value);
OpenPOWER on IntegriCloud