summaryrefslogtreecommitdiff
path: root/libexec/ld.so/resolve.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/resolve.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/resolve.c')
-rw-r--r--libexec/ld.so/resolve.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/libexec/ld.so/resolve.c b/libexec/ld.so/resolve.c
index eaea1f42b4a..765a5b66c1c 100644
--- a/libexec/ld.so/resolve.c
+++ b/libexec/ld.so/resolve.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: resolve.c,v 1.48 2008/04/09 21:45:26 kurt Exp $ */
+/* $OpenBSD: resolve.c,v 1.49 2008/05/05 02:29:02 kurt Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -70,13 +70,13 @@ _dl_add_object(elf_object_t *object)
* Initialize a new dynamic object.
*/
elf_object_t *
-_dl_finalize_object(const char *objname, Elf_Dyn *dynp, const long *dl_data,
- const int objtype, const long lbase, const long obase)
+_dl_finalize_object(const char *objname, Elf_Dyn *dynp, Elf_Phdr *phdrp,
+ int phdrc, const int objtype, const long lbase, const long obase)
{
elf_object_t *object;
#if 0
- _dl_printf("objname [%s], dynp %p, dl_data %p, objtype %x lbase %lx, obase %lx\n",
- objname, dynp, dl_data, objtype, lbase, obase);
+ _dl_printf("objname [%s], dynp %p, objtype %x lbase %lx, obase %lx\n",
+ objname, dynp, objtype, lbase, obase);
#endif
object = _dl_malloc(sizeof(elf_object_t));
object->prev = object->next = NULL;
@@ -134,10 +134,8 @@ _dl_finalize_object(const char *objname, Elf_Dyn *dynp, const long *dl_data,
object->chains = object->buckets + object->nbuckets;
}
- if (dl_data) {
- object->phdrp = (Elf_Phdr *) dl_data[AUX_phdr];
- object->phdrc = dl_data[AUX_phnum];
- }
+ object->phdrp = phdrp;
+ object->phdrc = phdrc;
object->obj_type = objtype;
object->load_base = lbase;
object->obj_base = obase;