diff options
| author | scottr <scottr@NetBSD.org> | 1997-01-03 22:37:58 +0000 |
|---|---|---|
| committer | scottr <scottr@NetBSD.org> | 1997-01-03 22:37:58 +0000 |
| commit | 372fe2ff92795b47efdc6bd04f1c828a0c813ac8 (patch) | |
| tree | 2f451dfd16666a82932e0baa12bde3b7e16f8567 /libexec | |
| parent | d71a874906d7b4a82ccb25aee21586af1c1a6787 (diff) | |
Catch up with const changes to dlopen() and dlsym() prototypes in
<dlfcn.h>. Tested on i386 and hp300 for crt0.o and ld.so, verified
other references by inspection.
Diffstat (limited to 'libexec')
| -rw-r--r-- | libexec/ld.aout_so/link.h | 6 | ||||
| -rw-r--r-- | libexec/ld.aout_so/rtld.c | 28 |
2 files changed, 17 insertions, 17 deletions
diff --git a/libexec/ld.aout_so/link.h b/libexec/ld.aout_so/link.h index 799d80ffc4d..8179034c81e 100644 --- a/libexec/ld.aout_so/link.h +++ b/libexec/ld.aout_so/link.h @@ -1,4 +1,4 @@ -/* $NetBSD: link.h,v 1.10 1996/01/09 00:00:11 pk Exp $ */ +/* $NetBSD: link.h,v 1.11 1997/01/03 22:39:03 scottr Exp $ */ /* * Copyright (c) 1993 Paul Kranenburg @@ -166,9 +166,9 @@ struct so_debug { * Entry points into ld.so - user interface to the run-time linker. */ struct ld_entry { - void *(*dlopen) __P((char *, int)); + void *(*dlopen) __P((const char *, int)); int (*dlclose) __P((void *)); - void *(*dlsym) __P((void *, char *)); + void *(*dlsym) __P((void *, const char *)); int (*dlctl) __P((void *, int, void *)); void (*dlexit) __P((void)); void (*dlrsrvd[3]) __P((void)); diff --git a/libexec/ld.aout_so/rtld.c b/libexec/ld.aout_so/rtld.c index e88be48e0d0..04bb79f6933 100644 --- a/libexec/ld.aout_so/rtld.c +++ b/libexec/ld.aout_so/rtld.c @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.c,v 1.46 1996/12/21 21:53:16 pk Exp $ */ +/* $NetBSD: rtld.c,v 1.47 1997/01/03 22:39:05 scottr Exp $ */ /* * Copyright (c) 1993 Paul Kranenburg * All rights reserved. @@ -172,9 +172,9 @@ static int ld_warn_non_pure_code; static int ld_tracing; -static void *__dlopen __P((char *, int)); +static void *__dlopen __P((const char *, int)); static int __dlclose __P((void *)); -static void *__dlsym __P((void *, char *)); +static void *__dlsym __P((void *, const char *)); static int __dlctl __P((void *, int, void *)); static void __dlexit __P((void)); @@ -199,9 +199,9 @@ static void reloc_map __P((struct so_map *)); static void reloc_copy __P((struct so_map *)); static void call_map __P((struct so_map *, char *)); static char *rtfindlib __P((char *, int, int, int *, char *)); -static struct nzlist *lookup __P((char *, struct so_map **, int)); -static inline struct rt_symbol *lookup_rts __P((char *)); -static struct rt_symbol *enter_rts __P((char *, long, int, caddr_t, +static struct nzlist *lookup __P((const char *, struct so_map **, int)); +static inline struct rt_symbol *lookup_rts __P((const char *)); +static struct rt_symbol *enter_rts __P((const char *, long, int, caddr_t, long, struct so_map *)); static void maphints __P((void)); static void unmaphints __P((void)); @@ -887,7 +887,7 @@ hash_string(key) static inline struct rt_symbol * lookup_rts(key) - char *key; + const char *key; { register int hashval; register struct rt_symbol *rtsp; @@ -907,7 +907,7 @@ lookup_rts(key) static struct rt_symbol * enter_rts(name, value, type, srcaddr, size, smp) - char *name; + const char *name; long value; int type; caddr_t srcaddr; @@ -953,7 +953,7 @@ enter_rts(name, value, type, srcaddr, size, smp) */ static struct nzlist * lookup(name, src_map, strong) - char *name; + const char *name; struct so_map **src_map; /* IN/OUT */ int strong; { @@ -994,7 +994,7 @@ restart: /* * Compute bucket in which the symbol might be found. */ - for (hashval = 0, cp = name; *cp; cp++) + for (hashval = 0, cp = (char *) name; *cp; cp++) hashval = (hashval << 1) + *cp; hashval = (hashval & 0x7fffffff) % buckets; @@ -1473,8 +1473,8 @@ backout: static void * __dlopen(name, mode) - char *name; - int mode; + const char *name; + int mode; { struct sod *sodp; struct so_map *smp; @@ -1539,8 +1539,8 @@ xprintf("dlclose(%s): refcount = %d\n", smp->som_path, LM_PRIVATE(smp)->spd_refc static void * __dlsym(fd, sym) - void *fd; - char *sym; + void *fd; + const char *sym; { struct so_map *smp = (struct so_map *)fd, *src_map = NULL; struct nzlist *np; |
