summaryrefslogtreecommitdiff
path: root/libexec/ld.so/library_mquery.c
diff options
context:
space:
mode:
authorKurt Miller <kurt@cvs.openbsd.org>2008-05-05 02:29:03 +0000
committerKurt Miller <kurt@cvs.openbsd.org>2008-05-05 02:29:03 +0000
commitad4c4a19f3244639fc47e7c3f573d916bb887d76 (patch)
tree7d146f91b712efe1f36bdc997c66c8517d8dbe06 /libexec/ld.so/library_mquery.c
parentd99b64f3f763942797bb5d8c17c19e084487877d (diff)
Constantly fill in the program header pointer and count in elf_object_t
for all objects which simplifies phdr usage in a few places. "go for it" drahn@
Diffstat (limited to 'libexec/ld.so/library_mquery.c')
-rw-r--r--libexec/ld.so/library_mquery.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libexec/ld.so/library_mquery.c b/libexec/ld.so/library_mquery.c
index 7d3af5b8330..b9d40a365a8 100644
--- a/libexec/ld.so/library_mquery.c
+++ b/libexec/ld.so/library_mquery.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: library_mquery.c,v 1.34 2006/05/10 03:26:50 deraadt Exp $ */
+/* $OpenBSD: library_mquery.c,v 1.35 2008/05/05 02:29:02 kurt Exp $ */
/*
* Copyright (c) 2002 Dale Rahn
@@ -280,8 +280,9 @@ retry:
_dl_close(libfile);
dynp = (Elf_Dyn *)((unsigned long)dynp + LOFF);
- object = _dl_finalize_object(libname, dynp, 0, type,
- (Elf_Addr)lowld->start, LOFF);
+ object = _dl_finalize_object(libname, dynp,
+ (Elf_Phdr *)((char *)lowld->start + ehdr->e_phoff), ehdr->e_phnum,
+ type, (Elf_Addr)lowld->start, LOFF);
if (object) {
object->prebind_data = prebind_data;
object->load_size = (Elf_Addr)load_end - (Elf_Addr)lowld->start;