Source-Changes-HG archive

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

[src/trunk]: src Add _dlauxinfo helper function to provide access to the ELF ...



details:   https://anonhg.NetBSD.org/src/rev/3ebe8752d549
branches:  trunk
changeset: 777378:3ebe8752d549
user:      joerg <joerg%NetBSD.org@localhost>
date:      Thu Feb 16 23:00:38 2012 +0000

description:
Add _dlauxinfo helper function to provide access to the ELF auxilary
vector. This can normally be found via __ps_strings, but libc is
initialised too early when linked dynamically and doesn't have access to
it yet, so provide an alternative mechanism via ld.elf_so.
Bump libc minor.

diffstat:

 distrib/sets/lists/base/ad.mips64eb |   6 +++---
 distrib/sets/lists/base/ad.mips64el |   6 +++---
 distrib/sets/lists/base/md.amd64    |   4 ++--
 distrib/sets/lists/base/md.sparc64  |   4 ++--
 distrib/sets/lists/base/shl.mi      |   6 +++---
 distrib/sets/lists/comp/ad.mips64eb |   6 +++---
 distrib/sets/lists/comp/ad.mips64el |   6 +++---
 distrib/sets/lists/comp/md.amd64    |   4 ++--
 distrib/sets/lists/comp/md.sparc64  |   4 ++--
 distrib/sets/lists/comp/shl.mi      |   4 ++--
 include/dlfcn.h                     |   4 +++-
 lib/libc/dlfcn/dlfcn_elf.c          |  18 ++++--------------
 lib/libc/misc/initfini.c            |  24 ++++++++++++++++++++----
 lib/libc/shlib_version              |   4 ++--
 libexec/ld.elf_so/rtld.c            |  16 +++++++++++-----
 libexec/ld.elf_so/rtld.h            |   4 +++-
 libexec/ld.elf_so/symbol.c          |   5 +++--
 17 files changed, 71 insertions(+), 54 deletions(-)

diffs (truncated from 475 to 300 lines):

diff -r 6e1e52d30583 -r 3ebe8752d549 distrib/sets/lists/base/ad.mips64eb
--- a/distrib/sets/lists/base/ad.mips64eb       Thu Feb 16 22:57:19 2012 +0000
+++ b/distrib/sets/lists/base/ad.mips64eb       Thu Feb 16 23:00:38 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64eb,v 1.82 2012/02/11 23:31:22 martin Exp $
+# $NetBSD: ad.mips64eb,v 1.83 2012/02/16 23:00:38 joerg Exp $
 ./libexec/ld.elf_so-64                         base-compat-shlib       compat,pic
 ./libexec/ld.elf_so-o32                                base-sysutil-bin        compat,pic
 ./usr/lib/64                                   base-compat-lib
@@ -66,7 +66,7 @@
 ./usr/lib/64/libbz2.so.1                       base-compat-shlib       compat,pic
 ./usr/lib/64/libbz2.so.1.1                     base-compat-shlib       compat,pic
 ./usr/lib/64/libc.so.12                                base-compat-shlib       compat,pic
-./usr/lib/64/libc.so.12.181                    base-compat-shlib       compat,pic
+./usr/lib/64/libc.so.12.182                    base-compat-shlib       compat,pic
 ./usr/lib/64/libcom_err.so.7                   base-compat-shlib       compat,pic,kerberos
 ./usr/lib/64/libcom_err.so.7.0                 base-compat-shlib       compat,pic,kerberos
 ./usr/lib/64/libcrypt.so.1                     base-compat-shlib       compat,pic
@@ -362,7 +362,7 @@
 ./usr/lib/o32/libbz2.so.1                      base-compat-shlib       compat,pic
 ./usr/lib/o32/libbz2.so.1.1                    base-compat-shlib       compat,pic
 ./usr/lib/o32/libc.so.12                       base-compat-shlib       compat,pic
-./usr/lib/o32/libc.so.12.181                   base-compat-shlib       compat,pic
+./usr/lib/o32/libc.so.12.182                   base-compat-shlib       compat,pic
 ./usr/lib/o32/libcom_err.so.7                  base-compat-shlib       compat,pic,kerberos
 ./usr/lib/o32/libcom_err.so.7.0                        base-compat-shlib       compat,pic,kerberos
 ./usr/lib/o32/libcrypt.so.1                    base-compat-shlib       compat,pic
diff -r 6e1e52d30583 -r 3ebe8752d549 distrib/sets/lists/base/ad.mips64el
--- a/distrib/sets/lists/base/ad.mips64el       Thu Feb 16 22:57:19 2012 +0000
+++ b/distrib/sets/lists/base/ad.mips64el       Thu Feb 16 23:00:38 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64el,v 1.81 2012/02/11 23:31:22 martin Exp $
+# $NetBSD: ad.mips64el,v 1.82 2012/02/16 23:00:38 joerg Exp $
 ./libexec/ld.elf_so-64                         base-compat-shlib       compat,pic
 ./libexec/ld.elf_so-o32                                base-sysutil-bin        compat,pic
 ./usr/lib/64                                   base-compat-lib
@@ -66,7 +66,7 @@
 ./usr/lib/64/libbz2.so.1                       base-compat-shlib       compat,pic
 ./usr/lib/64/libbz2.so.1.1                     base-compat-shlib       compat,pic
 ./usr/lib/64/libc.so.12                                base-compat-shlib       compat,pic
-./usr/lib/64/libc.so.12.181                    base-compat-shlib       compat,pic
+./usr/lib/64/libc.so.12.182                    base-compat-shlib       compat,pic
 ./usr/lib/64/libcom_err.so.7                   base-compat-shlib       compat,pic,kerberos
 ./usr/lib/64/libcom_err.so.7.0                 base-compat-shlib       compat,pic,kerberos
 ./usr/lib/64/libcrypt.so.1                     base-compat-shlib       compat,pic
@@ -362,7 +362,7 @@
 ./usr/lib/o32/libbz2.so.1                      base-compat-shlib       compat,pic
 ./usr/lib/o32/libbz2.so.1.1                    base-compat-shlib       compat,pic
 ./usr/lib/o32/libc.so.12                       base-compat-shlib       compat,pic
-./usr/lib/o32/libc.so.12.181                   base-compat-shlib       compat,pic
+./usr/lib/o32/libc.so.12.182                   base-compat-shlib       compat,pic
 ./usr/lib/o32/libcom_err.so.7                  base-compat-shlib       compat,pic,kerberos
 ./usr/lib/o32/libcom_err.so.7.0                        base-compat-shlib       compat,pic,kerberos
 ./usr/lib/o32/libcrypt.so.1                    base-compat-shlib       compat,pic
diff -r 6e1e52d30583 -r 3ebe8752d549 distrib/sets/lists/base/md.amd64
--- a/distrib/sets/lists/base/md.amd64  Thu Feb 16 22:57:19 2012 +0000
+++ b/distrib/sets/lists/base/md.amd64  Thu Feb 16 23:00:38 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.156 2012/02/11 23:31:22 martin Exp $
+# $NetBSD: md.amd64,v 1.157 2012/02/16 23:00:38 joerg Exp $
 ./dev/lms0                                     base-obsolete           obsolete
 ./dev/mms0                                     base-obsolete           obsolete
 ./libexec/ld.elf_so-i386                       base-sys-shlib          compat,pic
@@ -69,7 +69,7 @@
 ./usr/lib/i386/libbz2.so.1                     base-compat-shlib       compat,pic
 ./usr/lib/i386/libbz2.so.1.1                   base-compat-shlib       compat,pic
 ./usr/lib/i386/libc.so.12                      base-compat-shlib       compat,pic
-./usr/lib/i386/libc.so.12.181                  base-compat-shlib       compat,pic
+./usr/lib/i386/libc.so.12.182                  base-compat-shlib       compat,pic
 ./usr/lib/i386/libcom_err.so.7                 base-compat-shlib       compat,pic,kerberos
 ./usr/lib/i386/libcom_err.so.7.0               base-compat-shlib       compat,pic,kerberos
 ./usr/lib/i386/libcrypt.so.1                   base-compat-shlib       compat,pic
diff -r 6e1e52d30583 -r 3ebe8752d549 distrib/sets/lists/base/md.sparc64
--- a/distrib/sets/lists/base/md.sparc64        Thu Feb 16 22:57:19 2012 +0000
+++ b/distrib/sets/lists/base/md.sparc64        Thu Feb 16 23:00:38 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.sparc64,v 1.147 2012/02/11 23:31:22 martin Exp $
+# $NetBSD: md.sparc64,v 1.148 2012/02/16 23:00:38 joerg Exp $
 ./libexec/ld.elf_so-sparc                      base-sysutil-bin        compat,pic
 ./sbin/edlabel                                 base-sysutil-root       obsolete
 ./usr/bin/fdformat                             base-util-bin
@@ -67,7 +67,7 @@
 ./usr/lib/sparc/libbz2.so.1                    base-compat-shlib       compat,pic
 ./usr/lib/sparc/libbz2.so.1.1                  base-compat-shlib       compat,pic
 ./usr/lib/sparc/libc.so.12                     base-compat-shlib       compat,pic
-./usr/lib/sparc/libc.so.12.181                 base-compat-shlib       compat,pic
+./usr/lib/sparc/libc.so.12.182                 base-compat-shlib       compat,pic
 ./usr/lib/sparc/libcom_err.so.7                        base-compat-shlib       compat,pic,kerberos
 ./usr/lib/sparc/libcom_err.so.7.0              base-compat-shlib       compat,pic,kerberos
 ./usr/lib/sparc/libcrypt.so.1                  base-compat-shlib       compat,pic
diff -r 6e1e52d30583 -r 3ebe8752d549 distrib/sets/lists/base/shl.mi
--- a/distrib/sets/lists/base/shl.mi    Thu Feb 16 22:57:19 2012 +0000
+++ b/distrib/sets/lists/base/shl.mi    Thu Feb 16 23:00:38 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.616 2012/02/11 23:31:22 martin Exp $
+# $NetBSD: shl.mi,v 1.617 2012/02/16 23:00:38 joerg Exp $
 #
 # Note:        Don't delete entries from here - mark them as "obsolete" instead,
 #      unless otherwise stated below.
@@ -15,7 +15,7 @@
 #
 ./lib/libc.so                                  base-sys-shlib          dynamicroot
 ./lib/libc.so.12                               base-sys-shlib          dynamicroot
-./lib/libc.so.12.181                           base-sys-shlib          dynamicroot
+./lib/libc.so.12.182                           base-sys-shlib          dynamicroot
 ./lib/libcrypt.so                              base-sys-shlib          dynamicroot
 ./lib/libcrypt.so.1                            base-sys-shlib          dynamicroot
 ./lib/libcrypt.so.1.0                          base-sys-shlib          dynamicroot
@@ -173,7 +173,7 @@
 ./usr/lib/libbz2.so.1.1                                base-sys-shlib
 ./usr/lib/libc.so                              base-sys-shlib
 ./usr/lib/libc.so.12                           base-sys-shlib
-./usr/lib/libc.so.12.181                       base-sys-shlib
+./usr/lib/libc.so.12.182                       base-sys-shlib
 ./usr/lib/libcdk.so                            base-obsolete           obsolete
 ./usr/lib/libcom_err.so                                base-krb5-shlib         kerberos
 ./usr/lib/libcom_err.so.7                      base-krb5-shlib         kerberos
diff -r 6e1e52d30583 -r 3ebe8752d549 distrib/sets/lists/comp/ad.mips64eb
--- a/distrib/sets/lists/comp/ad.mips64eb       Thu Feb 16 22:57:19 2012 +0000
+++ b/distrib/sets/lists/comp/ad.mips64eb       Thu Feb 16 23:00:38 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64eb,v 1.69 2012/02/12 10:01:57 njoly Exp $
+# $NetBSD: ad.mips64eb,v 1.70 2012/02/16 23:00:38 joerg Exp $
 ./usr/bin/elf2aout                             comp-obsolete           obsolete
 ./usr/bin/elf2ecoff                            comp-sysutil-bin
 ./usr/include/gcc-4.5/loongson.h               comp-c-include          gcccmds,gcc=45
@@ -1266,7 +1266,7 @@
 ./usr/libdata/debug/usr/lib/64/libbluetooth.so.4.2.debug       comp-sys-debug  debug,compat
 ./usr/libdata/debug/usr/lib/64/libbsdmalloc.so.0.0.debug       comp-sys-debug  debug,compat
 ./usr/libdata/debug/usr/lib/64/libbz2.so.1.1.debug             comp-sys-debug  debug,compat
-./usr/libdata/debug/usr/lib/64/libc.so.12.181.debug    comp-sys-debug  debug,compat
+./usr/libdata/debug/usr/lib/64/libc.so.12.182.debug    comp-sys-debug  debug,compat
 ./usr/libdata/debug/usr/lib/64/libcom_err.so.6.0.debug  comp-compat-shlib       compat,pic,kerberos,debug,obsolete
 ./usr/libdata/debug/usr/lib/64/libcom_err.so.7.0.debug  comp-compat-shlib       compat,pic,kerberos,debug
 ./usr/libdata/debug/usr/lib/64/libcrypt.so.1.0.debug   comp-sys-debug  debug,compat
@@ -1418,7 +1418,7 @@
 ./usr/libdata/debug/usr/lib/o32/libbluetooth.so.4.2.debug      comp-sys-debug  debug,compat
 ./usr/libdata/debug/usr/lib/o32/libbsdmalloc.so.0.0.debug      comp-sys-debug  debug,compat
 ./usr/libdata/debug/usr/lib/o32/libbz2.so.1.1.debug            comp-sys-debug  debug,compat
-./usr/libdata/debug/usr/lib/o32/libc.so.12.181.debug   comp-sys-debug  debug,compat
+./usr/libdata/debug/usr/lib/o32/libc.so.12.182.debug   comp-sys-debug  debug,compat
 ./usr/libdata/debug/usr/lib/o32/libcom_err.so.6.0.debug         comp-compat-shlib       compat,pic,kerberos,debug,obsolete
 ./usr/libdata/debug/usr/lib/o32/libcom_err.so.7.0.debug         comp-compat-shlib       compat,pic,kerberos,debug
 ./usr/libdata/debug/usr/lib/o32/libcrypt.so.1.0.debug  comp-sys-debug  debug,compat
diff -r 6e1e52d30583 -r 3ebe8752d549 distrib/sets/lists/comp/ad.mips64el
--- a/distrib/sets/lists/comp/ad.mips64el       Thu Feb 16 22:57:19 2012 +0000
+++ b/distrib/sets/lists/comp/ad.mips64el       Thu Feb 16 23:00:38 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64el,v 1.69 2012/02/12 10:01:57 njoly Exp $
+# $NetBSD: ad.mips64el,v 1.70 2012/02/16 23:00:38 joerg Exp $
 ./usr/bin/elf2aout                             comp-obsolete           obsolete
 ./usr/bin/elf2ecoff                            comp-sysutil-bin
 ./usr/include/gcc-4.5/loongson.h               comp-c-include          gcccmds,gcc=45
@@ -1266,7 +1266,7 @@
 ./usr/libdata/debug/usr/lib/64/libbluetooth.so.4.2.debug       comp-sys-debug  debug,compat
 ./usr/libdata/debug/usr/lib/64/libbsdmalloc.so.0.0.debug       comp-sys-debug  debug,compat
 ./usr/libdata/debug/usr/lib/64/libbz2.so.1.1.debug             comp-sys-debug  debug,compat
-./usr/libdata/debug/usr/lib/64/libc.so.12.181.debug    comp-sys-debug  debug,compat
+./usr/libdata/debug/usr/lib/64/libc.so.12.182.debug    comp-sys-debug  debug,compat
 ./usr/libdata/debug/usr/lib/64/libcom_err.so.6.0.debug  comp-compat-shlib       compat,pic,kerberos,debug,obsolete
 ./usr/libdata/debug/usr/lib/64/libcom_err.so.7.0.debug  comp-compat-shlib       compat,pic,kerberos,debug
 ./usr/libdata/debug/usr/lib/64/libcrypt.so.1.0.debug   comp-sys-debug  debug,compat
@@ -1418,7 +1418,7 @@
 ./usr/libdata/debug/usr/lib/o32/libbluetooth.so.4.2.debug      comp-sys-debug  debug,compat
 ./usr/libdata/debug/usr/lib/o32/libbsdmalloc.so.0.0.debug      comp-sys-debug  debug,compat
 ./usr/libdata/debug/usr/lib/o32/libbz2.so.1.1.debug            comp-sys-debug  debug,compat
-./usr/libdata/debug/usr/lib/o32/libc.so.12.181.debug   comp-sys-debug  debug,compat
+./usr/libdata/debug/usr/lib/o32/libc.so.12.182.debug   comp-sys-debug  debug,compat
 ./usr/libdata/debug/usr/lib/o32/libcom_err.so.6.0.debug         comp-compat-shlib       compat,pic,kerberos,debug,obsolete
 ./usr/libdata/debug/usr/lib/o32/libcom_err.so.7.0.debug         comp-compat-shlib       compat,pic,kerberos,debug
 ./usr/libdata/debug/usr/lib/o32/libcrypt.so.1.0.debug  comp-sys-debug  debug,compat
diff -r 6e1e52d30583 -r 3ebe8752d549 distrib/sets/lists/comp/md.amd64
--- a/distrib/sets/lists/comp/md.amd64  Thu Feb 16 22:57:19 2012 +0000
+++ b/distrib/sets/lists/comp/md.amd64  Thu Feb 16 23:00:38 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.155 2012/02/12 10:01:57 njoly Exp $
+# $NetBSD: md.amd64,v 1.156 2012/02/16 23:00:39 joerg Exp $
 ./usr/include/amd64                            comp-c-include
 ./usr/include/amd64/ansi.h                     comp-c-include
 ./usr/include/amd64/aout_machdep.h             comp-c-include
@@ -1048,7 +1048,7 @@
 ./usr/libdata/debug/usr/lib/i386/libbluetooth.so.4.2.debug     comp-compat-shlib       compat,pic,debug
 ./usr/libdata/debug/usr/lib/i386/libbsdmalloc.so.0.0.debug     comp-compat-shlib       compat,pic,debug
 ./usr/libdata/debug/usr/lib/i386/libbz2.so.1.1.debug   comp-compat-shlib       compat,pic,debug
-./usr/libdata/debug/usr/lib/i386/libc.so.12.181.debug  comp-compat-shlib       compat,pic,debug
+./usr/libdata/debug/usr/lib/i386/libc.so.12.182.debug  comp-compat-shlib       compat,pic,debug
 ./usr/libdata/debug/usr/lib/i386/libcom_err.so.6.0.debug       comp-compat-shlib       compat,pic,kerberos,debug,obsolete
 ./usr/libdata/debug/usr/lib/i386/libcom_err.so.7.0.debug       comp-compat-shlib       compat,pic,kerberos,debug
 ./usr/libdata/debug/usr/lib/i386/libcrypt.so.1.0.debug comp-compat-shlib       compat,pic,debug
diff -r 6e1e52d30583 -r 3ebe8752d549 distrib/sets/lists/comp/md.sparc64
--- a/distrib/sets/lists/comp/md.sparc64        Thu Feb 16 22:57:19 2012 +0000
+++ b/distrib/sets/lists/comp/md.sparc64        Thu Feb 16 23:00:38 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.sparc64,v 1.138 2012/02/12 10:01:57 njoly Exp $
+# $NetBSD: md.sparc64,v 1.139 2012/02/16 23:00:39 joerg Exp $
 ./usr/include/gcc-4.5/tgmath.h                 comp-c-include          gcccmds,gcc=45
 ./usr/include/ieeefp.h                         comp-c-include
 ./usr/include/sparc                            comp-c-include
@@ -891,7 +891,7 @@
 ./usr/libdata/debug/usr/lib/sparc/libbluetooth.so.4.2.debug            comp-compat-shlib       compat,pic,debug
 ./usr/libdata/debug/usr/lib/sparc/libbsdmalloc.so.0.0.debug            comp-compat-shlib       compat,pic,debug
 ./usr/libdata/debug/usr/lib/sparc/libbz2.so.1.1.debug                  comp-compat-shlib       compat,pic,debug
-./usr/libdata/debug/usr/lib/sparc/libc.so.12.181.debug                 comp-compat-shlib       compat,pic,debug
+./usr/libdata/debug/usr/lib/sparc/libc.so.12.182.debug                 comp-compat-shlib       compat,pic,debug
 ./usr/libdata/debug/usr/lib/sparc/libcom_err.so.6.0.debug      comp-compat-shlib       compat,pic,kerberos,debug,obsolete
 ./usr/libdata/debug/usr/lib/sparc/libcom_err.so.7.0.debug      comp-compat-shlib       compat,pic,kerberos,debug
 ./usr/libdata/debug/usr/lib/sparc/libcrypt.so.1.0.debug                        comp-compat-shlib       compat,pic,debug
diff -r 6e1e52d30583 -r 3ebe8752d549 distrib/sets/lists/comp/shl.mi
--- a/distrib/sets/lists/comp/shl.mi    Thu Feb 16 22:57:19 2012 +0000
+++ b/distrib/sets/lists/comp/shl.mi    Thu Feb 16 23:00:38 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.209 2012/02/12 10:01:58 njoly Exp $
+# $NetBSD: shl.mi,v 1.210 2012/02/16 23:00:39 joerg Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -248,7 +248,7 @@
 ./usr/libdata/debug/usr/lib/libbluetooth.so.4.2.debug  comp-sys-debug  debug
 ./usr/libdata/debug/usr/lib/libbsdmalloc.so.0.0.debug  comp-sys-debug  debug
 ./usr/libdata/debug/usr/lib/libbz2.so.1.1.debug                comp-sys-debug  debug
-./usr/libdata/debug/usr/lib/libc.so.12.181.debug       comp-sys-debug  debug
+./usr/libdata/debug/usr/lib/libc.so.12.182.debug       comp-sys-debug  debug
 ./usr/libdata/debug/usr/lib/libcom_err.so.7.0.debug    comp-krb5-debug kerberos,debug
 ./usr/libdata/debug/usr/lib/libcrypt.so.1.0.debug      comp-sys-debug  debug
 ./usr/libdata/debug/usr/lib/libcrypto.so.7.0.debug     comp-crypto-debug       crypto,debug
diff -r 6e1e52d30583 -r 3ebe8752d549 include/dlfcn.h
--- a/include/dlfcn.h   Thu Feb 16 22:57:19 2012 +0000
+++ b/include/dlfcn.h   Thu Feb 16 23:00:38 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dlfcn.h,v 1.23 2011/06/25 05:45:11 nonaka Exp $        */
+/*     $NetBSD: dlfcn.h,v 1.24 2012/02/16 23:00:39 joerg Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -48,6 +48,8 @@
  * User interface to the run-time linker.
  */
 __BEGIN_DECLS
+void *_dlauxinfo(void) __pure;
+
 void   *dlopen(const char *, int);
 int    dlclose(void *);
 void   *dlsym(void * __restrict, const char * __restrict);
diff -r 6e1e52d30583 -r 3ebe8752d549 lib/libc/dlfcn/dlfcn_elf.c
--- a/lib/libc/dlfcn/dlfcn_elf.c        Thu Feb 16 22:57:19 2012 +0000
+++ b/lib/libc/dlfcn/dlfcn_elf.c        Thu Feb 16 23:00:38 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dlfcn_elf.c,v 1.10 2011/06/25 05:45:11 nonaka Exp $    */
+/*     $NetBSD: dlfcn_elf.c,v 1.11 2012/02/16 23:00:39 joerg Exp $     */
 
 /*
  * Copyright (c) 2000 Takuya SHIOZAKI
@@ -27,7 +27,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: dlfcn_elf.c,v 1.10 2011/06/25 05:45:11 nonaka Exp $");
+__RCSID("$NetBSD: dlfcn_elf.c,v 1.11 2012/02/16 23:00:39 joerg Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -149,21 +149,14 @@
 static const Elf_Phdr *dlpi_phdr;
 static Elf_Half dlpi_phnum;
 
-/*
- * Declare as common symbol to allow new libc with older binaries to
- * not trigger an undefined reference.
- */
-extern __dso_hidden void *__auxinfo;
-
 static void
 dl_iterate_phdr_setup(void)
 {
        const AuxInfo *aux;
 
-       if (__auxinfo == NULL)
-               return;
+       _DIAGASSERT(_dlauxinfo() != NULL);
 
-       for (aux = __auxinfo; aux->a_type != AT_NULL; ++aux) {
+       for (aux = _dlauxinfo(); aux->a_type != AT_NULL; ++aux) {
                switch (aux->a_type) {
                case AT_BASE:
                        dlpi_addr = aux->a_v;
@@ -189,9 +182,6 @@
        static bool setup_done;
        struct dl_phdr_info phdr_info;
 
-       if (__auxinfo == NULL)
-               return EOPNOTSUPP;
-
        if (!setup_done) {
                /*
                 * This can race on the first call to dl_iterate_phdr.
diff -r 6e1e52d30583 -r 3ebe8752d549 lib/libc/misc/initfini.c
--- a/lib/libc/misc/initfini.c  Thu Feb 16 22:57:19 2012 +0000
+++ b/lib/libc/misc/initfini.c  Thu Feb 16 23:00:38 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: initfini.c,v 1.9 2011/03/09 23:10:06 joerg Exp $        */



Home | Main Index | Thread Index | Old Index