From: kurt Date: Mon, 28 Jul 2008 22:11:00 +0000 (+0000) Subject: Only optimize away plt relocation when obj_base == 0. Corrects X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8e012c2a8359f5177fc3833e98b7c51ddd7c3a9c;p=openbsd Only optimize away plt relocation when obj_base == 0. Corrects pie relocation. Assembly debugging help from kettenis@. okay kettenis@ miod@ --- diff --git a/libexec/ld.so/alpha/rtld_machine.c b/libexec/ld.so/alpha/rtld_machine.c index 202bf9f4bc9..4d72f51c7fd 100644 --- a/libexec/ld.so/alpha/rtld_machine.c +++ b/libexec/ld.so/alpha/rtld_machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld_machine.c,v 1.42 2008/04/09 21:45:26 kurt Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.43 2008/07/28 22:11:00 kurt Exp $ */ /* * Copyright (c) 1999 Dale Rahn @@ -284,7 +284,7 @@ _dl_md_reloc_got(elf_object_t *object, int lazy) if (object->obj_type == OBJTYPE_LDR || !lazy || pltgot == NULL) { fails = _dl_md_reloc(object, DT_JMPREL, DT_PLTRELSZ); } else { - if (object->obj_type != OBJTYPE_EXE) { + if (object->obj_base != 0) { int i, size; Elf_Addr *addr; Elf_RelA *rela;