summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libexec/ld.so/hppa/rtld_machine.c4
-rw-r--r--libexec/ld.so/library_subr.c5
-rw-r--r--libexec/ld.so/mips64/syscall.h66
-rw-r--r--libexec/ld.so/resolve.c17
4 files changed, 44 insertions, 48 deletions
diff --git a/libexec/ld.so/hppa/rtld_machine.c b/libexec/ld.so/hppa/rtld_machine.c
index 330a8440252..5971c2cfb75 100644
--- a/libexec/ld.so/hppa/rtld_machine.c
+++ b/libexec/ld.so/hppa/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.10 2005/09/22 01:33:08 drahn Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.11 2005/09/22 04:07:11 deraadt Exp $ */
/*
* Copyright (c) 2004 Michael Shalayeff
@@ -158,7 +158,7 @@ _dl_md_reloc(elf_object_t *object, int rel, int relasz)
pt = (Elf_Addr *)(rela->r_offset + loff);
ooff = 0;
- this = NULL;
+ this = NULL;
if (ELF_R_SYM(rela->r_info) && sym->st_name) {
ooff = _dl_find_symbol_bysym(object,
ELF_R_SYM(rela->r_info), &this,
diff --git a/libexec/ld.so/library_subr.c b/libexec/ld.so/library_subr.c
index 4c5b4944233..28843ba6765 100644
--- a/libexec/ld.so/library_subr.c
+++ b/libexec/ld.so/library_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: library_subr.c,v 1.9 2005/09/19 02:31:04 drahn Exp $ */
+/* $OpenBSD: library_subr.c,v 1.10 2005/09/22 04:07:10 deraadt Exp $ */
/*
* Copyright (c) 2002 Dale Rahn
@@ -231,8 +231,7 @@ nohints:
/*
* attempt to locate and load a library based on libpath, sod info and
- * if it needs to respect hints,
- * passing type and flags to perform open
+ * if it needs to respect hints, passing type and flags to perform open
*/
elf_object_t *
_dl_load_shlib_hint(struct sod *sod, struct sod *req_sod, int type,
diff --git a/libexec/ld.so/mips64/syscall.h b/libexec/ld.so/mips64/syscall.h
index 1524eafbe93..13bace0ca9d 100644
--- a/libexec/ld.so/mips64/syscall.h
+++ b/libexec/ld.so/mips64/syscall.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: syscall.h,v 1.2 2004/09/09 17:47:44 pefo Exp $ */
+/* $OpenBSD: syscall.h,v 1.3 2005/09/22 04:07:11 deraadt Exp $ */
/*
* Copyright (c) 1998-2002 Opsycon AB, Sweden.
@@ -289,55 +289,53 @@ _dl_lseek(int fd, off_t offset, int whence)
extern inline int
_dl_sigprocmask(int how, const sigset_t *set, sigset_t *oset)
{
- sigset_t sig_store;
- sigset_t sig_store1;
+ sigset_t sig_store;
+ sigset_t sig_store1;
- if (set != NULL) {
- sig_store1 = *set;
- } else {
- sig_store1 = 0;
- }
+ if (set != NULL)
+ sig_store1 = *set;
+ else
+ sig_store1 = 0;
- __asm__ volatile (
+ __asm__ volatile (
"move $4,%2\n\t"
"move $5,%3\n\t"
"li $2,%1\n\t"
- "syscall\n\t"
- "move %0, $2"
- : "=r" (sig_store)
- : "I" (SYS_sigprocmask), "r" (how), "r" (sig_store1)
+ "syscall\n\t"
+ "move %0, $2"
+ : "=r" (sig_store)
+ : "I" (SYS_sigprocmask), "r" (how), "r" (sig_store1)
: "$3", "$4", "$5", "$6", "$7", "$8", "$9",
"$10","$11","$12","$13","$14","$15","$24","$25");
- if (oset != NULL)
- *oset = sig_store;
+ if (oset != NULL)
+ *oset = sig_store;
- return 0;
+ return 0;
}
static inline int
_dl_sysctl(int *name, u_int namelen, void *oldp, size_t *oldplen, void *newp,
size_t newlen)
{
- register int status __asm__ ("$2");
-
- __asm__ volatile (
- "move $4,%2\n\t"
- "move $5,%3\n\t"
- "move $6,%4\n\t"
- "move $7,%5\n\t"
- "move $8,%6\n\t"
- "move $9,%7\n\t"
+ register int status __asm__ ("$2");
+
+ __asm__ volatile (
+ "move $4,%2\n\t"
+ "move $5,%3\n\t"
+ "move $6,%4\n\t"
+ "move $7,%5\n\t"
+ "move $8,%6\n\t"
+ "move $9,%7\n\t"
"li $2,%1\n\t"
- "syscall\n\t"
- "beqz $2,1f\n\t"
- "li $2,-1\n\t"
- "1:"
- : "=r" (status)
- : "I" (SYS___sysctl), "r" (name), "r" (namelen), "r" (oldp),
- "r" (oldplen), "r" (newp), "r" (newlen)
+ "syscall\n\t"
+ "beqz $2,1f\n\t"
+ "li $2,-1\n\t"
+ "1:"
+ : "=r" (status)
+ : "I" (SYS___sysctl), "r" (name), "r" (namelen), "r" (oldp),
+ "r" (oldplen), "r" (newp), "r" (newlen)
: "$3", "$4", "$5", "$6", "$7", "$8", "$9",
"$10","$11","$12","$13","$14","$15","$24","$25");
- return status;
+ return status;
}
-
#endif /*__DL_SYSCALL_H__*/
diff --git a/libexec/ld.so/resolve.c b/libexec/ld.so/resolve.c
index 0ad4bbd5faa..16b20ef2d23 100644
--- a/libexec/ld.so/resolve.c
+++ b/libexec/ld.so/resolve.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: resolve.c,v 1.33 2005/09/22 01:33:07 drahn Exp $ */
+/* $OpenBSD: resolve.c,v 1.34 2005/09/22 04:07:11 deraadt Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -219,11 +219,11 @@ _dl_find_symbol_bysym(elf_object_t *req_obj, unsigned int symidx,
const elf_object_t *sobj;
_dl_symcachestat_lookups ++;
- if ((_dl_symcache != NULL) &&
- (symidx < req_obj->nchains) &&
- (_dl_symcache[symidx].obj != NULL) &&
- (_dl_symcache[symidx].sym != NULL) &&
- (_dl_symcache[symidx].flags == flags)) {
+ if (_dl_symcache != NULL &&
+ symidx < req_obj->nchains &&
+ _dl_symcache[symidx].obj != NULL &&
+ _dl_symcache[symidx].sym != NULL &&
+ _dl_symcache[symidx].flags == flags) {
_dl_symcachestat_hits++;
sobj = _dl_symcache[symidx].obj;
@@ -242,8 +242,7 @@ _dl_find_symbol_bysym(elf_object_t *req_obj, unsigned int symidx,
if (pobj)
*pobj = sobj;
- if ((_dl_symcache != NULL) &&
- (symidx < req_obj->nchains)) {
+ if (_dl_symcache != NULL && symidx < req_obj->nchains) {
_dl_symcache[symidx].sym = *this;
_dl_symcache[symidx].obj = sobj;
_dl_symcache[symidx].flags = flags;
@@ -317,7 +316,7 @@ _dl_find_symbol(const char *name, const Elf_Sym **this,
if ((flags & SYM_SEARCH_SELF) || (flags & SYM_SEARCH_NEXT))
skip = 1;
-
+
/*
* search dlopened objects: global or req_obj == dlopened_obj
* and and it's children