Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/ld.elf_so Put the dlopen, and friends entry points back.



details:   https://anonhg.NetBSD.org/src/rev/db3508bc109a
branches:  trunk
changeset: 750808:db3508bc109a
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri Jan 15 07:07:11 2010 +0000

description:
Put the dlopen,and friends entry points back.

They're needed by pre-2.0 binaries. Backward compatibiliity for these
was broken by another commit recently which I'll fix shortly.

diffstat:

 libexec/ld.elf_so/reloc.c |  12 ++++++++++--
 libexec/ld.elf_so/rtld.h  |  10 +++++++++-
 2 files changed, 19 insertions(+), 3 deletions(-)

diffs (57 lines):

diff -r f3946ae511a9 -r db3508bc109a libexec/ld.elf_so/reloc.c
--- a/libexec/ld.elf_so/reloc.c Fri Jan 15 01:00:46 2010 +0000
+++ b/libexec/ld.elf_so/reloc.c Fri Jan 15 07:07:11 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: reloc.c,v 1.99 2010/01/14 21:52:07 skrll Exp $  */
+/*     $NetBSD: reloc.c,v 1.100 2010/01/15 07:07:11 skrll Exp $         */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -39,7 +39,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: reloc.c,v 1.99 2010/01/14 21:52:07 skrll Exp $");
+__RCSID("$NetBSD: reloc.c,v 1.100 2010/01/15 07:07:11 skrll Exp $");
 #endif /* not lint */
 
 #include <err.h>
@@ -202,6 +202,14 @@
                obj->magic = RTLD_MAGIC;
                obj->version = RTLD_VERSION;
 
+               /* Fill in the dynamic linker entry points. */
+               obj->dlopen = dlopen;
+               obj->dlsym = dlsym;
+               obj->dlerror = dlerror;
+               obj->dlclose = dlclose;
+               obj->dladdr = dladdr;
+               obj->dlinfo = dlinfo;
+
                dbg(("fixing up PLTGOT"));
                /* Set the special PLTGOT entries. */
                if (obj->pltgot != NULL)
diff -r f3946ae511a9 -r db3508bc109a libexec/ld.elf_so/rtld.h
--- a/libexec/ld.elf_so/rtld.h  Fri Jan 15 01:00:46 2010 +0000
+++ b/libexec/ld.elf_so/rtld.h  Fri Jan 15 07:07:11 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtld.h,v 1.85 2010/01/14 21:52:07 skrll Exp $   */
+/*     $NetBSD: rtld.h,v 1.86 2010/01/15 07:07:12 skrll Exp $   */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -162,6 +162,14 @@
        void            (*init)(void);  /* Initialization function to call */
        void            (*fini)(void);  /* Termination function to call */
 
+       /* Entry points for dlopen() and friends. */
+       void           *(*dlopen)(const char *, int);
+       void           *(*dlsym)(void *, const char *);
+       char           *(*dlerror)(void);
+       int             (*dlclose)(void *);
+       int             (*dladdr)(const void *, Dl_info *);
+       int             (*dlinfo)(void *, int, void *);
+
        u_int32_t       mainprog:1,     /* True if this is the main program */
                        rtld:1,         /* True if this is the dynamic linker */
                        textrel:1,      /* True if there are relocations to



Home | Main Index | Thread Index | Old Index