summaryrefslogtreecommitdiff
path: root/libexec/ld.so/sparc64
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/ld.so/sparc64')
-rw-r--r--libexec/ld.so/sparc64/archdep.h84
-rw-r--r--libexec/ld.so/sparc64/rtld_machine.c5
-rw-r--r--libexec/ld.so/sparc64/syscall.h7
3 files changed, 10 insertions, 86 deletions
diff --git a/libexec/ld.so/sparc64/archdep.h b/libexec/ld.so/sparc64/archdep.h
index cd2ea9b3abe..b4ce7694c3c 100644
--- a/libexec/ld.so/sparc64/archdep.h
+++ b/libexec/ld.so/sparc64/archdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: archdep.h,v 1.5 2002/02/16 21:27:30 millert Exp $ */
+/* $OpenBSD: archdep.h,v 1.6 2002/02/21 23:17:53 drahn Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -46,86 +46,8 @@
#include <machine/exec.h>
#include <machine/reloc.h>
#include <sys/syscall.h>
-
-int _dl_write(int, const char *, int);
-
-/*
- * The following functions are declared inline so they can
- * be used before bootstrap linking has been finished.
- */
-static inline void
-_dl_wrstderr(const char *s)
-{
- while(*s) {
- _dl_write(2, s, 1);
- s++;
- }
-}
-
-static inline void *
-_dl_memset(void *p, const char v, size_t c)
-{
- char *ip = p;
-
- while(c--)
- *ip++ = v;
- return(p);
-}
-
-static inline int
-_dl_strlen(const char *p)
-{
- const char *s = p;
-
- while(*s != '\0')
- s++;
- return(s - p);
-}
-
-static inline char *
-_dl_strcpy(char *d, const char *s)
-{
- char *rd = d;
-
- while((*d++ = *s++) != '\0');
-
- return(rd);
-}
-
-static inline int
-_dl_strncmp(const char *d, const char *s, int c)
-{
- while(c-- && *d && *d == *s) {
- d++;
- s++;
- };
- if(c < 0) {
- return(0);
- }
- return(*d - *s);
-}
-
-static inline int
-_dl_strcmp(const char *d, const char *s)
-{
- while(*d && *d == *s) {
- d++;
- s++;
- }
- return(*d - *s);
-}
-
-static inline const char *
-_dl_strchr(const char *p, const int c)
-{
- while(*p) {
- if(*p == c) {
- return(p);
- }
- p++;
- }
- return(0);
-}
+#include "syscall.h"
+#include "util.h"
static inline long
_dl_mmap(void *addr, unsigned int len, unsigned int prot,
diff --git a/libexec/ld.so/sparc64/rtld_machine.c b/libexec/ld.so/sparc64/rtld_machine.c
index d15e24253dd..07641725708 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.9 2002/02/20 05:04:34 jason Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.10 2002/02/21 23:17:53 drahn Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
@@ -289,6 +289,7 @@ resolve_failed:
fails++;
continue;
}
+ value += (Elf_Addr)(ooff + this->st_value);
#ifdef notyet
/*
* XXX Hmm, we should change the API of _dl_find_symbol and do this in there,
@@ -304,7 +305,6 @@ resolve_failed:
}
#endif
}
- value += (Elf_Addr)(ooff + this->st_value);
}
if (type == R_TYPE(JMP_SLOT)) {
@@ -316,7 +316,6 @@ resolve_failed:
void *dstaddr = where;
const void *srcaddr;
const Elf_Sym *dstsym = sym, *srcsym = NULL;
- const char *name = symn;
size_t size = dstsym->st_size;
Elf_Addr soff;
diff --git a/libexec/ld.so/sparc64/syscall.h b/libexec/ld.so/sparc64/syscall.h
index 9233615d393..f5bcca662b9 100644
--- a/libexec/ld.so/sparc64/syscall.h
+++ b/libexec/ld.so/sparc64/syscall.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: syscall.h,v 1.3 2002/02/16 21:27:30 millert Exp $ */
+/* $OpenBSD: syscall.h,v 1.4 2002/02/21 23:17:53 drahn Exp $ */
/*
* Copyright (c) 2001 Niklas Hallqvist
@@ -32,6 +32,9 @@
*
*/
+#ifndef __DL_SYSCALL_H__
+#define __DL_SYSCALL_H__
+
#ifdef USE_CACHE
#include <sys/stat.h>
#endif
@@ -52,7 +55,6 @@ long _dl___syscall(quad_t, ...);
int _dl_mprotect(const void *, int, int);
int _dl_munmap(const void*, unsigned int);
int _dl_open(const char*, unsigned int);
-void _dl_printf(const char *, ...);
int _dl_read(int, const char*, int);
#ifdef USE_CACHE
int _dl_stat(const char *, struct stat *);
@@ -77,3 +79,4 @@ _dl_suid_ok (void)
}
#include <elf_abi.h>
+#endif /*__DL_SYSCALL_H__*/