summaryrefslogtreecommitdiff
path: root/libexec/ld.so/library_mquery.c
diff options
context:
space:
mode:
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) {