summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
Diffstat (limited to 'libexec')
-rw-r--r--libexec/ld.elf_so/headers.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libexec/ld.elf_so/headers.c b/libexec/ld.elf_so/headers.c
index cd4e4c59637..a2945ec70d0 100644
--- a/libexec/ld.elf_so/headers.c
+++ b/libexec/ld.elf_so/headers.c
@@ -1,4 +1,4 @@
-/* $NetBSD: headers.c,v 1.59 2014/08/26 21:20:05 joerg Exp $ */
+/* $NetBSD: headers.c,v 1.60 2016/05/22 19:28:39 joerg Exp $ */
/*
* Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: headers.c,v 1.59 2014/08/26 21:20:05 joerg Exp $");
+__RCSID("$NetBSD: headers.c,v 1.60 2016/05/22 19:28:39 joerg Exp $");
#endif /* not lint */
#include <err.h>
@@ -389,9 +389,9 @@ _rtld_digest_phdr(const Elf_Phdr *phdr, int phnum, caddr_t entry)
if (ph->p_type != PT_PHDR)
continue;
- obj->phdr = (void *)(uintptr_t)ph->p_vaddr;
- obj->phsize = ph->p_memsz;
obj->relocbase = (caddr_t)((uintptr_t)phdr - (uintptr_t)ph->p_vaddr);
+ obj->phdr = phdr; /* Equivalent to relocbase + p_vaddr. */
+ obj->phsize = ph->p_memsz;
dbg(("headers: phdr %p (%p) phsize %zu relocbase %p",
obj->phdr, phdr, obj->phsize, obj->relocbase));
break;