Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/libexec/ld.elf_so Don't assume that PT_PHDR is always first.
details: https://anonhg.NetBSD.org/src/rev/cf7f39d18dcf
branches: trunk
changeset: 786290:cf7f39d18dcf
user: matt <matt%NetBSD.org@localhost>
date: Thu Apr 25 13:14:41 2013 +0000
description:
Don't assume that PT_PHDR is always first.
diffstat:
libexec/ld.elf_so/headers.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 582d9f8649b8 -r cf7f39d18dcf libexec/ld.elf_so/headers.c
--- a/libexec/ld.elf_so/headers.c Thu Apr 25 13:04:27 2013 +0000
+++ b/libexec/ld.elf_so/headers.c Thu Apr 25 13:14:41 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: headers.c,v 1.44 2013/04/24 22:37:20 matt Exp $ */
+/* $NetBSD: headers.c,v 1.45 2013/04/25 13:14:41 matt Exp $ */
/*
* Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: headers.c,v 1.44 2013/04/24 22:37:20 matt Exp $");
+__RCSID("$NetBSD: headers.c,v 1.45 2013/04/25 13:14:41 matt Exp $");
#endif /* not lint */
#include <err.h>
@@ -373,7 +373,7 @@
obj->phdr = (void *)(uintptr_t)phdr->p_vaddr;
obj->phsize = phdr->p_memsz;
- obj->relocbase = (caddr_t)((uintptr_t)phdr - (uintptr_t)ph->p_vaddr);
+ obj->relocbase = (caddr_t)((uintptr_t)ph - (uintptr_t)ph->p_vaddr);
dbg(("headers: phdr %p phsize %zu relocbase %lx", obj->phdr,
obj->phsize, (long)obj->relocbase));
break;
Home |
Main Index |
Thread Index |
Old Index