Restore backwards compatibility by removing unnecessary addition of

dlvsym to Obj_Entry.

Add some comments.
This commit is contained in:
skrll 2011-12-02 09:06:49 +00:00
parent 8250293e5f
commit 8737e6c85f
2 changed files with 14 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: reloc.c,v 1.104 2011/06/25 05:45:12 nonaka Exp $ */
/* $NetBSD: reloc.c,v 1.105 2011/12/02 09:06:49 skrll Exp $ */
/*
* Copyright 1996 John D. Polstra.
@ -39,7 +39,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: reloc.c,v 1.104 2011/06/25 05:45:12 nonaka Exp $");
__RCSID("$NetBSD: reloc.c,v 1.105 2011/12/02 09:06:49 skrll Exp $");
#endif /* not lint */
#include <err.h>
@ -210,10 +210,13 @@ _rtld_relocate_objects(Obj_Entry *first, bool bind_now)
obj->magic = RTLD_MAGIC;
obj->version = RTLD_VERSION;
/* Fill in the dynamic linker entry points. */
/*
* Fill in the backwards compatibility dynamic linker entry points.
*
* DO NOT ADD TO THIS LIST
*/
obj->dlopen = dlopen;
obj->dlsym = dlsym;
obj->dlvsym = dlvsym;
obj->dlerror = dlerror;
obj->dlclose = dlclose;
obj->dladdr = dladdr;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rtld.h,v 1.106 2011/06/25 05:45:12 nonaka Exp $ */
/* $NetBSD: rtld.h,v 1.107 2011/12/02 09:06:49 skrll Exp $ */
/*
* Copyright 1996 John D. Polstra.
@ -191,10 +191,14 @@ typedef struct Struct_Obj_Entry {
void (*init)(void); /* Initialization function to call */
void (*fini)(void); /* Termination function to call */
/* Entry points for dlopen() and friends. */
/*
* BACKWARDS COMPAT Entry points for dlopen() and friends.
*
* DO NOT MOVE OR ADD TO THE LIST
*
*/
void *(*dlopen)(const char *, int);
void *(*dlsym)(void *, const char *);
void *(*dlvsym)(void *, const char *, const char *);
char *(*dlerror)(void);
int (*dlclose)(void *);
int (*dladdr)(const void *, Dl_info *);