diff --git a/libexec/ld.elf_so/arch/sparc/mdreloc.c b/libexec/ld.elf_so/arch/sparc/mdreloc.c index 4c0bb9b931a6..10f64c42b854 100644 --- a/libexec/ld.elf_so/arch/sparc/mdreloc.c +++ b/libexec/ld.elf_so/arch/sparc/mdreloc.c @@ -1,4 +1,4 @@ -/* $NetBSD: mdreloc.c,v 1.21 2002/09/06 15:32:56 mycroft Exp $ */ +/* $NetBSD: mdreloc.c,v 1.22 2002/09/06 15:51:23 mycroft Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -273,10 +273,11 @@ _rtld_relocate_nonplt_objects(obj, self, dodebug) value = rela->r_addend; /* - * Handle relative relocs here, because we might not - * be able to access globals yet. + * Handle relative relocs here, because we might not be able to + * access the reloc_target_{flags,bitmask}[] tables while + * relocating ourself. */ - if (self && type == R_TYPE(RELATIVE)) { + if (type == R_TYPE(RELATIVE)) { *where += (Elf_Addr)(obj->relocbase + value); continue; } diff --git a/libexec/ld.elf_so/arch/sparc64/mdreloc.c b/libexec/ld.elf_so/arch/sparc64/mdreloc.c index 7ad8bbfbf8d7..96878e90a222 100644 --- a/libexec/ld.elf_so/arch/sparc64/mdreloc.c +++ b/libexec/ld.elf_so/arch/sparc64/mdreloc.c @@ -1,4 +1,4 @@ -/* $NetBSD: mdreloc.c,v 1.16 2002/09/06 15:32:57 mycroft Exp $ */ +/* $NetBSD: mdreloc.c,v 1.17 2002/09/06 15:51:24 mycroft Exp $ */ /*- * Copyright (c) 2000 Eduardo Horvath. @@ -555,10 +555,11 @@ _rtld_relocate_nonplt_objects(obj, self, dodebug) value = rela->r_addend; /* - * Handle relative relocs here, because we might not - * be able to access globals yet. + * Handle relative relocs here, because we might not be able to + * access the reloc_target_{flags,bitmask}[] tables while + * relocating ourself. */ - if (self && type == R_TYPE(RELATIVE)) { + if (type == R_TYPE(RELATIVE)) { /* XXXX -- apparently we ignore the preexisting value */ *where = (Elf_Addr)(obj->relocbase + value); continue;