summaryrefslogtreecommitdiff
path: root/libexec/ld.so/library_mquery.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-05-10 03:26:51 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-05-10 03:26:51 +0000
commitcf97ee05053b2ae65d1e6e63ec2e13c62fcca5d2 (patch)
tree05d3c5fdb0726887a76e0dc95b073fc8bdcb08d1 /libexec/ld.so/library_mquery.c
parentb32f8986c8d688b879c13a31e66a7debe5502d64 (diff)
pretty this up; ok drahn
Diffstat (limited to 'libexec/ld.so/library_mquery.c')
-rw-r--r--libexec/ld.so/library_mquery.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/libexec/ld.so/library_mquery.c b/libexec/ld.so/library_mquery.c
index 93edfe12ecd..7d3af5b8330 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.33 2006/05/03 16:10:51 drahn Exp $ */
+/* $OpenBSD: library_mquery.c,v 1.34 2006/05/10 03:26:50 deraadt Exp $ */
/*
* Copyright (c) 2002 Dale Rahn
@@ -64,6 +64,7 @@ void
_dl_unload_shlib(elf_object_t *object)
{
struct dep_node *n;
+
DL_DEB(("unload_shlib called on %s\n", object->load_name));
if (OBJECT_REF_CNT(object) == 0 &&
(object->status & STAT_UNLOADED) == 0) {
@@ -82,18 +83,16 @@ _dl_unload_shlib(elf_object_t *object)
elf_object_t *
_dl_tryload_shlib(const char *libname, int type, int flags)
{
- int libfile, i, align = _dl_pagesz - 1;
+ int libfile, i, align = _dl_pagesz - 1, off, size;
struct load_list *ld, *lowld = NULL;
elf_object_t *object;
- char hbuf[4096];
Elf_Dyn *dynp = 0;
Elf_Ehdr *ehdr;
Elf_Phdr *phdp;
- int off;
- int size;
Elf_Addr load_end = 0;
struct stat sb;
void *prebind_data;
+ char hbuf[4096];
#define ROUND_PG(x) (((x) + align) & ~(align))
#define TRUNC_PG(x) ((x) & ~(align))
@@ -252,8 +251,8 @@ retry:
}
for (ld = lowld; ld != NULL; ld = ld->next) {
- off_t foff;
int fd, flags;
+ off_t foff;
void *res;
if (ld->foff < 0) {