Date: Fri, 17 Apr 1998 04:05:23 +0800 (CST) From: clkao@cirx.org To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/6328: gnu/usr.bin/ld/rtld code clean up Message-ID: <199804162005.EAA01204@heaven.pamud.net>
next in thread | raw e-mail | index | archive | help
>Number: 6328 >Category: bin >Synopsis: gnu/usr.bin/ld/rtld code clean up >Confidential: yes >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Apr 17 01:10:03 PDT 1998 >Last-Modified: >Originator: Chia-liang Kao >Organization: Panther Tech. Co. >Release: FreeBSD 2.2.6-RELEASE i386 >Environment: FreeBSD 2.2.6-RELEASE i386 >Description: clean up some warnings caused by imcompatiable types. >How-To-Repeat: just make the rtld, you'll get 4 warnings. >Fix: --- rtld.c.orig Fri Apr 17 03:41:13 1998 +++ rtld.c Fri Apr 17 03:49:06 1998 @@ -199,26 +199,26 @@ struct so_map *link_map_tail; struct rt_symbol *rt_symbol_head; -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 char *__dlerror __P((void)); +static void *__dlsym __P((void *, const char *)); +static const char *__dlerror __P((void)); static void __dlexit __P((void)); -static void *__dlsym3 __P((void *, char *, void *)); +static void *__dlsym3 __P((void *, const char *, void *)); static struct ld_entry ld_entry = { __dlopen, __dlclose, __dlsym, __dlerror, __dlexit, __dlsym3 }; void xprintf __P((char *, ...)); -static struct so_map *map_object __P(( char *, +static struct so_map *map_object __P(( const char *, struct sod *, struct so_map *)); static int map_preload __P((void)); static int map_sods __P((struct so_map *)); static int reloc_and_init __P((struct so_map *, int)); static void unmap_object __P((struct so_map *, int)); -static struct so_map *alloc_link_map __P(( char *, struct sod *, +static struct so_map *alloc_link_map __P(( const char *, struct sod *, struct so_map *, caddr_t, struct _dynamic *)); static void free_link_map __P((struct so_map *)); @@ -515,7 +515,7 @@ */ static struct so_map * alloc_link_map(path, sodp, parent, addr, dp) - char *path; + const char *path; struct sod *sodp; struct so_map *parent; caddr_t addr; @@ -619,7 +619,7 @@ */ static struct so_map * map_object(path, sodp, parent) - char *path; + const char *path; struct sod *sodp; struct so_map *parent; { @@ -872,7 +872,7 @@ */ (void)alloc_link_map(NULL, sodp, parent, 0, 0); } else if (ld_ignore_missing_objects) { - char *msg; + const char *msg; /* * Call __dlerror() even it we're not going to use * the message, in order to clear the saved message. @@ -1841,7 +1841,7 @@ static void * __dlopen(path, mode) - char *path; + const char *path; int mode; { struct so_map *old_tail = link_map_tail; @@ -1905,7 +1905,7 @@ static void * __dlsym(fd, sym) void *fd; - char *sym; + const char *sym; { if (fd == RTLD_NEXT) { generror("RTLD_NEXT not supported by this version of" @@ -1978,7 +1978,7 @@ static void * __dlsym3(fd, sym, retaddr) void *fd; - char *sym; + const char *sym; void *retaddr; { void *result; @@ -2003,7 +2003,7 @@ return result; } - static char * + static const char * __dlerror __P((void)) { char *err; @@ -2030,7 +2030,7 @@ static void die __P((void)) { - char *msg; + const char *msg; fprintf(stderr, "ld.so failed"); if ((msg = __dlerror()) != NULL) >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804162005.EAA01204>