summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2003-07-28 03:11:01 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2003-07-28 03:11:01 +0000
commitf53fd3b96886107435bdf03f65e0e9f61c51119e (patch)
tree4b383175cff47c928bb32066f9cdec3b23c685de /libexec
parente10bfab0b5d0f11377df97e4649b2f57e0ef1f9d (diff)
The fifth argument to _dl_find_symbol is a 'int size', not a SYM_ define.
Fix several calls which had the incorrect but working define in that position It happened that SYM_NOTPLT was 0, which was the desired size value.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/ld.so/alpha/rtld_machine.c14
-rw-r--r--libexec/ld.so/i386/rtld_machine.c8
-rw-r--r--libexec/ld.so/mips/rtld_machine.c14
-rw-r--r--libexec/ld.so/powerpc/rtld_machine.c17
-rw-r--r--libexec/ld.so/sparc/rtld_machine.c14
-rw-r--r--libexec/ld.so/sparc64/rtld_machine.c14
6 files changed, 29 insertions, 52 deletions
diff --git a/libexec/ld.so/alpha/rtld_machine.c b/libexec/ld.so/alpha/rtld_machine.c
index ea16b9123ef..8705cc97a4e 100644
--- a/libexec/ld.so/alpha/rtld_machine.c
+++ b/libexec/ld.so/alpha/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.24 2003/07/06 20:04:00 deraadt Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.25 2003/07/28 03:11:00 drahn Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
@@ -241,15 +241,13 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
object->got_size = 0;
this = NULL;
ooff = _dl_find_symbol("__got_start", object, &this,
- SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, SYM_NOTPLT,
- NULL);
+ SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, 0, NULL);
if (this != NULL)
object->got_addr = ooff + this->st_value;
this = NULL;
ooff = _dl_find_symbol("__got_end", object, &this,
- SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, SYM_NOTPLT,
- NULL);
+ SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, 0, NULL);
if (this != NULL)
object->got_size = ooff + this->st_value - object->got_addr;
@@ -257,15 +255,13 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
object->plt_size = 0;
this = NULL;
ooff = _dl_find_symbol("__plt_start", object, &this,
- SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, SYM_NOTPLT,
- NULL);
+ SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, 0, NULL);
if (this != NULL)
plt_addr = ooff + this->st_value;
this = NULL;
ooff = _dl_find_symbol("__plt_end", object, &this,
- SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, SYM_NOTPLT,
- NULL);
+ SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, 0, NULL);
if (this != NULL)
object->plt_size = ooff + this->st_value - plt_addr;
diff --git a/libexec/ld.so/i386/rtld_machine.c b/libexec/ld.so/i386/rtld_machine.c
index 2ee83f7ff94..1f501216e46 100644
--- a/libexec/ld.so/i386/rtld_machine.c
+++ b/libexec/ld.so/i386/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.9 2003/06/03 16:20:41 art Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.10 2003/07/28 03:11:00 drahn Exp $ */
/*
* Copyright (c) 2002 Dale Rahn
@@ -417,15 +417,13 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
object->got_size = 0;
this = NULL;
ooff = _dl_find_symbol("__got_start", object, &this,
- SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, SYM_NOTPLT,
- NULL);
+ SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, 0, NULL);
if (this != NULL)
object->got_addr = ooff + this->st_value;
this = NULL;
ooff = _dl_find_symbol("__got_end", object, &this,
- SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, SYM_NOTPLT,
- NULL);
+ SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, 0, NULL);
if (this != NULL)
object->got_size = ooff + this->st_value - object->got_addr;
diff --git a/libexec/ld.so/mips/rtld_machine.c b/libexec/ld.so/mips/rtld_machine.c
index 7ade381ba3f..eaca0b86c0e 100644
--- a/libexec/ld.so/mips/rtld_machine.c
+++ b/libexec/ld.so/mips/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.12 2003/06/09 16:10:04 deraadt Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.13 2003/07/28 03:11:00 drahn Exp $ */
/*
* Copyright (c) 1998-2002 Opsycon AB, Sweden.
@@ -158,29 +158,25 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
this = NULL;
ooff = _dl_find_symbol("__got_start", object, &this,
- SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, SYM_NOTPLT,
- NULL);
+ SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, 0, NULL);
if (this != NULL)
object->got_addr = ooff + this->st_value;
this = NULL;
ooff = _dl_find_symbol("__got_end", object, &this,
- SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, SYM_NOTPLT,
- NULL);
+ SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, 0, NULL);
if (this != NULL)
object->got_size = ooff + this->st_value - object->got_addr;
this = NULL;
ooff = _dl_find_symbol("__plt_start", object, &this,
- SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, SYM_NOTPLT,
- NULL);
+ SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, 0, NULL);
if (this != NULL)
object->plt_addr = ooff + this->st_value;
this = NULL;
ooff = _dl_find_symbol("__plt_end", object, &this,
- SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, SYM_NOTPLT,
- NULL);
+ SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, 0, NULL);
if (this != NULL)
object->plt_size = ooff + this->st_value - object->plt_addr;
diff --git a/libexec/ld.so/powerpc/rtld_machine.c b/libexec/ld.so/powerpc/rtld_machine.c
index e8129f58b11..2e9f83c42f0 100644
--- a/libexec/ld.so/powerpc/rtld_machine.c
+++ b/libexec/ld.so/powerpc/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.27 2003/07/06 20:04:00 deraadt Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.28 2003/07/28 03:11:00 drahn Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
@@ -461,15 +461,13 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
object->got_size = 0;
this = NULL;
ooff = _dl_find_symbol("__got_start", object, &this,
- SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, SYM_NOTPLT,
- NULL);
+ SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, 0, NULL);
if (this != NULL)
object->got_addr = ooff + this->st_value;
this = NULL;
ooff = _dl_find_symbol("__got_end", object, &this,
- SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, SYM_NOTPLT,
- NULL);
+ SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, 0, NULL);
if (this != NULL)
object->got_size = ooff + this->st_value - object->got_addr;
@@ -477,15 +475,13 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
object->plt_size = 0;
this = NULL;
ooff = _dl_find_symbol("__plt_start", object, &this,
- SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, SYM_NOTPLT,
- NULL);
+ SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, 0, NULL);
if (this != NULL)
plt_addr = ooff + this->st_value;
this = NULL;
ooff = _dl_find_symbol("__plt_end", object, &this,
- SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, SYM_NOTPLT,
- NULL);
+ SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, 0, NULL);
if (this != NULL)
object->plt_size = ooff + this->st_value - plt_addr;
@@ -568,8 +564,7 @@ _dl_bind(elf_object_t *object, int reloff)
r_addr = (Elf_Addr *)(object->load_offs + relas->r_offset);
this = NULL;
ooff = _dl_find_symbol(symn, _dl_objects, &this,
- SYM_SEARCH_ALL|SYM_WARNNOTFOUND|SYM_PLT, SYM_NOTPLT,
- object->load_name);
+ SYM_SEARCH_ALL|SYM_WARNNOTFOUND|SYM_PLT, 0, object->load_name);
if (this == NULL) {
_dl_printf("lazy binding failed!\n");
*((int *)0) = 0; /* XXX */
diff --git a/libexec/ld.so/sparc/rtld_machine.c b/libexec/ld.so/sparc/rtld_machine.c
index b9f6820c24a..af60b9cf25e 100644
--- a/libexec/ld.so/sparc/rtld_machine.c
+++ b/libexec/ld.so/sparc/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.16 2003/07/06 20:04:00 deraadt Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.17 2003/07/28 03:11:00 drahn Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
@@ -413,15 +413,13 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
object->got_size = 0;
this = NULL;
ooff = _dl_find_symbol("__got_start", object, &this,
- SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, SYM_NOTPLT,
- NULL);
+ SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, 0, NULL);
if (this != NULL)
object->got_addr = ooff + this->st_value;
this = NULL;
ooff = _dl_find_symbol("__got_end", object, &this,
- SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, SYM_NOTPLT,
- NULL);
+ SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, 0, NULL);
if (this != NULL)
object->got_size = ooff + this->st_value - object->got_addr;
@@ -429,15 +427,13 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
object->plt_size = 0;
this = NULL;
ooff = _dl_find_symbol("__plt_start", object, &this,
- SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, SYM_NOTPLT,
- NULL);
+ SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, 0, NULL);
if (this != NULL)
plt_addr = ooff + this->st_value;
this = NULL;
ooff = _dl_find_symbol("__plt_end", object, &this,
- SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, SYM_NOTPLT,
- NULL);
+ SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, 0, NULL);
if (this != NULL)
object->plt_size = ooff + this->st_value - plt_addr;
diff --git a/libexec/ld.so/sparc64/rtld_machine.c b/libexec/ld.so/sparc64/rtld_machine.c
index 93a28a9dd0c..3dea5af724c 100644
--- a/libexec/ld.so/sparc64/rtld_machine.c
+++ b/libexec/ld.so/sparc64/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.27 2003/07/06 20:04:00 deraadt Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.28 2003/07/28 03:11:00 drahn Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
@@ -705,15 +705,13 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
object->got_size = 0;
this = NULL;
ooff = _dl_find_symbol("__got_start", object, &this,
- SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, SYM_NOTPLT,
- NULL);
+ SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, 0, NULL);
if (this != NULL)
object->got_addr = ooff + this->st_value;
this = NULL;
ooff = _dl_find_symbol("__got_end", object, &this,
- SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, SYM_NOTPLT,
- NULL);
+ SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, 0, NULL);
if (this != NULL)
object->got_size = ooff + this->st_value - object->got_addr;
@@ -721,15 +719,13 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
object->plt_size = 0;
this = NULL;
ooff = _dl_find_symbol("__plt_start", object, &this,
- SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, SYM_NOTPLT,
- NULL);
+ SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, 0, NULL);
if (this != NULL)
plt_addr = ooff + this->st_value;
this = NULL;
ooff = _dl_find_symbol("__plt_end", object, &this,
- SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, SYM_NOTPLT,
- NULL);
+ SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, 0, NULL);
if (this != NULL)
object->plt_size = ooff + this->st_value - plt_addr;