diff options
author | rie <none@none> | 2007-10-29 17:19:25 -0700 |
---|---|---|
committer | rie <none@none> | 2007-10-29 17:19:25 -0700 |
commit | 3c4993fb5a74112f361d71dab20997bdc749a7fb (patch) | |
tree | 5ccfb048d94145d9cd676e74bcaeb045a16b71f1 | |
parent | 3cb34c601f3ef3016f638574f5982e80c3735c71 (diff) | |
download | illumos-joyent-3c4993fb5a74112f361d71dab20997bdc749a7fb.tar.gz |
6617855 nodirect tag can be ignored when other syminfo tags are available
-rw-r--r-- | usr/src/cmd/sgs/lari/lari.pl | 50 | ||||
-rw-r--r-- | usr/src/cmd/sgs/libld/common/args.c | 15 | ||||
-rw-r--r-- | usr/src/cmd/sgs/libld/common/syms.c | 3 | ||||
-rw-r--r-- | usr/src/cmd/sgs/liblddbg/common/liblddbg.msg | 5 | ||||
-rw-r--r-- | usr/src/cmd/sgs/librtld_db/common/mapfile-vers | 14 | ||||
-rw-r--r-- | usr/src/cmd/sgs/packages/common/SUNWonld-README | 2 | ||||
-rw-r--r-- | usr/src/lib/libaio/amd64/mapfile-vers | 6 | ||||
-rw-r--r-- | usr/src/lib/libaio/i386/mapfile-vers | 6 | ||||
-rw-r--r-- | usr/src/lib/libaio/sparc/mapfile-vers | 6 | ||||
-rw-r--r-- | usr/src/lib/libaio/sparcv9/mapfile-vers | 6 | ||||
-rw-r--r-- | usr/src/lib/libresolv/mapfile-vers | 4 | ||||
-rw-r--r-- | usr/src/lib/libresolv2/common/mapfile-vers | 2 | ||||
-rw-r--r-- | usr/src/lib/librt/amd64/mapfile-vers | 6 | ||||
-rw-r--r-- | usr/src/lib/librt/i386/mapfile-vers | 6 | ||||
-rw-r--r-- | usr/src/lib/librt/sparc/mapfile-vers | 6 | ||||
-rw-r--r-- | usr/src/lib/librt/sparcv9/mapfile-vers | 6 | ||||
-rw-r--r-- | usr/src/lib/libxnet/common/mapfile-vers | 2 |
17 files changed, 89 insertions, 56 deletions
diff --git a/usr/src/cmd/sgs/lari/lari.pl b/usr/src/cmd/sgs/lari/lari.pl index 53dded7534..fff5d3f045 100644 --- a/usr/src/cmd/sgs/lari/lari.pl +++ b/usr/src/cmd/sgs/lari/lari.pl @@ -33,7 +33,7 @@ use vars qw($Prog $DestDir $ObjRef $ObjFlag $ObjSize $ObjVis $TmpDir); use vars qw($LddArgs $SymFlag); use vars qw($Glob $Intp $Dirc $Cpyr $Prot $Extn $Self $Gfte $Plta $User $Func); -use vars qw($Sfte $Afte $Objt $Nodi $Osft $Oaft $Ssft $Saft $Msft); +use vars qw($Rejt $Sfte $Afte $Objt $Nodi $Osft $Oaft $Ssft $Saft $Msft); use vars qw($Rtld $GlobWeak $MultSyms $CrtSyms $Platform $DbgSeed %opt); # Global arrays that must be cleared for multi input file use. @@ -97,6 +97,7 @@ $Cpyr = 0x00040; # symbol bound to copy-relocation reference $Prot = 0x00080; # symbol is protected (symbolic) $Extn = 0x00100; # symbol has been bound to from an external reference $Self = 0x00200; # symbol has been bound to from the same object +$Rejt = 0x00400; # symbol binding was (at some point) rejected $Plta = 0x00800; # symbol bound to executables plt address $User = 0x01000; # symbol binding originates from user (dlsym) request $Func = 0x02000; # symbol is of type function @@ -550,7 +551,7 @@ sub ProcBindings { # and walk each field until we find what we need. @Fields = split(' ', $Line); - # The referencing file, "... binding file=".*". + # The referencing file, "... binding file=.* ". while ($Fields[$Offset]) { if ($Fields[$Offset] =~ /^file=(.*)/) { $RefFile = $1; @@ -572,10 +573,14 @@ sub ProcBindings { $Detail = 1; $Offset++; } - # The destination file, "... to file=".*". + # The destination file, "... to file=.* ". Note, in the + # case of a rejection message, the file is terminated + # with a colon, "... to file=.*: ", which must be + # removed while ($Fields[$Offset]) { if ($Fields[$Offset] =~ /^file=(.*)/) { $DstFile = $1; + $DstFile =~ s/:$//; $Offset++; last; } @@ -590,10 +595,12 @@ sub ProcBindings { } $Offset++; } - # Possible trailing binding info, "... (direct,.*)$". + # Possible trailing binding info, "... (direct,...", or + # a rejection, "... (rejected - ...". while ($Fields[$Offset]) { - if ($Fields[$Offset] =~ /^\((.*)\)$/) { + if ($Fields[$Offset] =~ /^\((.*)/) { $BndInfo = $1; + $Detail = 1; $Offset++; last; } @@ -652,6 +659,10 @@ sub ProcBindings { $Symbols{$SymName}{$DstFile}[$ObjFlag] |= $Plta; $Objects{$DstFile}{$SymName} |= $Plta; } + if ($BndInfo =~ /rejected/) { + $Symbols{$SymName}{$DstFile}[$ObjFlag] |= $Rejt; + $Objects{$DstFile}{$SymName} |= $Rejt; + } if ($Dlsym) { $Symbols{$SymName}{$DstFile}[$ObjFlag] |= $User; $Objects{$DstFile}{$SymName} |= $User; @@ -893,10 +904,10 @@ sub ProcBindings { my ($DisVis) = ""; # Do we just want overhead symbols. Consider - # copy-relocations, and plt address binding, - # as overhead too. + # copy-relocations, rejections, and plt address + # binding, as overhead too. if ($opt{o} && (($Flag & - ($Extn | $Cpyr | $Plta)) == $Extn)) { + ($Rejt | $Extn | $Cpyr | $Plta)) == $Extn)) { next; } @@ -912,12 +923,14 @@ sub ProcBindings { # bound to, as the number of reserved symbols # can be quite excessive. Also, remove any # standard filters, as nothing can bind to these - # symbols anyway. + # symbols anyway, provided they have not + # contributed to a rejected binding. if (!$opt{a} && ((($SymName =~ $MultSyms) && (($Flag & ($Extn | $Self)) == 0)) || (($SymName =~ $CrtSyms) && (($Flag & ($Extn | $Self | $Prot)) == 0)) || - ($Flag & ($Ssft | $Osft)))) { + (($Flag & ($Ssft | $Osft)) && + (($Flag & $Rejt) == 0)))) { next; } @@ -985,6 +998,11 @@ sub ProcBindings { if ($Flag & $Nodi) { $Str = $Str . 'N'; } + # Was a binding to this definition rejected at + # some point. + if ($Flag & $Rejt) { + $Str = $Str . 'r'; + } # Determine whether this is a function or a data # object. For the latter, display the symbol @@ -1041,14 +1059,14 @@ sub Interesting { my ($SymName) = @_; my ($ObjCnt, $GFlags, $BndCnt, $FltCnt, $NodiCnt, $RdirCnt, $ExRef); - my ($TotCnt); + my ($RejCnt, $TotCnt); # Scan all definitions of this symbol, thus determining the definition # count, the number of filters, redirections, executable references # (copy-relocations, or plt addresses), no-direct bindings, and the # number of definitions that have been bound to. $ObjCnt = $GFlags = $BndCnt = $FltCnt = - $NodiCnt = $RdirCnt = $ExRef = $TotCnt = 0; + $NodiCnt = $RdirCnt = $ExRef = $RejCnt = $TotCnt = 0; foreach my $Obj (keys(%{$Symbols{$SymName}})) { my ($Flag) = $Symbols{$SymName}{$Obj}[$ObjFlag]; @@ -1079,6 +1097,9 @@ sub Interesting if ($Flag & $Msft) { $RdirCnt++; } + if ($Flag & $Rejt) { + $RejCnt++; + } # Ignore bindings to undefined .plts, and copy-relocation # references. These are implementation details, rather than @@ -1102,6 +1123,11 @@ sub Interesting return $TotCnt; } + # Any rejected symbol is interesting + if ($RejCnt) { + return $TotCnt; + } + # Single instance symbol definitions aren't very interesting. if ($ObjCnt == 1) { return 0; diff --git a/usr/src/cmd/sgs/libld/common/args.c b/usr/src/cmd/sgs/libld/common/args.c index da0910b34c..5ae61e3f7d 100644 --- a/usr/src/cmd/sgs/libld/common/args.c +++ b/usr/src/cmd/sgs/libld/common/args.c @@ -411,14 +411,17 @@ check_flags(Ofl_desc * ofl, int argc) } else { /* - * Dynamic relocatable object - */ - /* - * By default we print relocation errors for - * executables but *not* for a shared object + * Dynamic relocatable object. */ if (ztflag == 0) ofl->ofl_flags1 |= FLG_OF1_TEXTOFF; + + if (ofl->ofl_interp) { + eprintf(ofl->ofl_lml, ERR_FATAL, + MSG_INTL(MSG_ARG_INCOMP), + MSG_ORIG(MSG_ARG_R), MSG_ORIG(MSG_ARG_CI)); + ofl->ofl_flags |= FLG_OF_FATAL; + } } } else { ofl->ofl_flags |= FLG_OF_STATIC; @@ -487,7 +490,7 @@ check_flags(Ofl_desc * ofl, int argc) if (rflag) { /* * We can only strip the symbol table and string table - * if no output relocations will refer to them + * if no output relocations will refer to them. */ if (sflag) { eprintf(ofl->ofl_lml, ERR_WARNING, diff --git a/usr/src/cmd/sgs/libld/common/syms.c b/usr/src/cmd/sgs/libld/common/syms.c index 1ef6d58ee7..5052d81511 100644 --- a/usr/src/cmd/sgs/libld/common/syms.c +++ b/usr/src/cmd/sgs/libld/common/syms.c @@ -166,8 +166,7 @@ ld_sym_nodirect(Is_desc *isp, Ifl_desc *ifl, Ofl_desc *ofl) char *str; Sym_desc *sdp; - if (((sifdata->si_flags & SYMINFO_FLG_NOEXTDIRECT) == 0) || - (sifdata->si_boundto < SYMINFO_BT_LOWRESERVE)) + if ((sifdata->si_flags & SYMINFO_FLG_NOEXTDIRECT) == 0) continue; sym = (Sym *)(symdata + _cnt); diff --git a/usr/src/cmd/sgs/liblddbg/common/liblddbg.msg b/usr/src/cmd/sgs/liblddbg/common/liblddbg.msg index 6f8a131363..1f19a9e207 100644 --- a/usr/src/cmd/sgs/liblddbg/common/liblddbg.msg +++ b/usr/src/cmd/sgs/liblddbg/common/liblddbg.msg @@ -303,7 +303,10 @@ @ MSG_BND_WEAK_2 "binding file=%s (%#llx:%#llx) to 0x0 \ (undefined weak): symbol `%s'" -@ MSG_BND_REJECT "binding file=%s to file=%s: symbol `%s': rejected: %s" +# NOTE: the rejected message is used by lari(1), use care when changing. This +# message is formatted to conform to the pattern used by the MSG_BINFO messages. +@ MSG_BND_REJECT "binding file=%s to file=%s: symbol `%s' \ + (rejected: %s)" @ MSG_BNDREJ_NODIR "attempt to directly bind to a NODIRECT definition" @ MSG_BNDREJ_SINGLE "attempt to bind to a SINGLETON definition without \ following default search model" diff --git a/usr/src/cmd/sgs/librtld_db/common/mapfile-vers b/usr/src/cmd/sgs/librtld_db/common/mapfile-vers index a055b74e91..0739202216 100644 --- a/usr/src/cmd/sgs/librtld_db/common/mapfile-vers +++ b/usr/src/cmd/sgs/librtld_db/common/mapfile-vers @@ -47,11 +47,11 @@ SUNW_1.1 { #Externally defined symbols { global: - ps_pauxv = PARENT; - ps_pdmodel = PARENT; - ps_pglobal_lookup = PARENT; - ps_pglobal_sym = PARENT; - ps_plog = PARENT; - ps_pread = PARENT; - ps_pwrite = PARENT; + ps_pauxv = NODIRECT PARENT; + ps_pdmodel = NODIRECT PARENT; + ps_pglobal_lookup = NODIRECT PARENT; + ps_pglobal_sym = NODIRECT PARENT; + ps_plog = NODIRECT PARENT; + ps_pread = NODIRECT PARENT; + ps_pwrite = NODIRECT PARENT; }; diff --git a/usr/src/cmd/sgs/packages/common/SUNWonld-README b/usr/src/cmd/sgs/packages/common/SUNWonld-README index 82f7b2d2ce..447cfbde3d 100644 --- a/usr/src/cmd/sgs/packages/common/SUNWonld-README +++ b/usr/src/cmd/sgs/packages/common/SUNWonld-README @@ -1294,3 +1294,5 @@ Bugid Risk Synopsis 6614968 elfedit needs string table module (D) 6620533 HWCAP filtering can leave uninitialized data behind - results in "rejected: Invalid argument" +6617855 nodirect tag can be ignored when other syminfo tags are available + (link-editor components only) diff --git a/usr/src/lib/libaio/amd64/mapfile-vers b/usr/src/lib/libaio/amd64/mapfile-vers index f2ab03aef4..d0b7162950 100644 --- a/usr/src/lib/libaio/amd64/mapfile-vers +++ b/usr/src/lib/libaio/amd64/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -50,8 +50,8 @@ SUNW_0.7 { aioread = FUNCTION; aiowait = FUNCTION; aiowrite = FUNCTION; - close = FUNCTION; - fork = FUNCTION; + close = NODIRECT FUNCTION; + fork = NODIRECT FUNCTION; sigaction = FUNCTION; }; diff --git a/usr/src/lib/libaio/i386/mapfile-vers b/usr/src/lib/libaio/i386/mapfile-vers index 606354068a..0de2a6ae92 100644 --- a/usr/src/lib/libaio/i386/mapfile-vers +++ b/usr/src/lib/libaio/i386/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -51,8 +51,8 @@ SUNW_0.7 { aioread = FUNCTION; aiowait = FUNCTION; aiowrite = FUNCTION; - close = FUNCTION; - fork = FUNCTION; + close = NODIRECT FUNCTION; + fork = NODIRECT FUNCTION; sigaction = FUNCTION; }; diff --git a/usr/src/lib/libaio/sparc/mapfile-vers b/usr/src/lib/libaio/sparc/mapfile-vers index fd7a0afe13..f86fa78c62 100644 --- a/usr/src/lib/libaio/sparc/mapfile-vers +++ b/usr/src/lib/libaio/sparc/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -47,8 +47,8 @@ SUNW_1.0 { SUNW_0.7 { global: - close = FUNCTION; - fork = FUNCTION; + close = NODIRECT FUNCTION; + fork = NODIRECT FUNCTION; sigaction = FUNCTION; } SISCD_2.3; diff --git a/usr/src/lib/libaio/sparcv9/mapfile-vers b/usr/src/lib/libaio/sparcv9/mapfile-vers index f2ab03aef4..d0b7162950 100644 --- a/usr/src/lib/libaio/sparcv9/mapfile-vers +++ b/usr/src/lib/libaio/sparcv9/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -50,8 +50,8 @@ SUNW_0.7 { aioread = FUNCTION; aiowait = FUNCTION; aiowrite = FUNCTION; - close = FUNCTION; - fork = FUNCTION; + close = NODIRECT FUNCTION; + fork = NODIRECT FUNCTION; sigaction = FUNCTION; }; diff --git a/usr/src/lib/libresolv/mapfile-vers b/usr/src/lib/libresolv/mapfile-vers index 6e7d8ac332..a10e29995b 100644 --- a/usr/src/lib/libresolv/mapfile-vers +++ b/usr/src/lib/libresolv/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -42,7 +42,7 @@ SUNW_0.7 { fp_query; _getlong; _getshort; - h_errno = FILTER libnsl.so.1; + h_errno = NODIRECT FILTER libnsl.so.1; hostalias; p_cdname; p_class; diff --git a/usr/src/lib/libresolv2/common/mapfile-vers b/usr/src/lib/libresolv2/common/mapfile-vers index 72b0b1ff14..efc8f0e426 100644 --- a/usr/src/lib/libresolv2/common/mapfile-vers +++ b/usr/src/lib/libresolv2/common/mapfile-vers @@ -54,7 +54,7 @@ SUNW_2.1 { # SunOS 5.6 (Solaris 2.6) __fp_query; _getlong; _getshort; - h_errno = FILTER libnsl.so.1; + h_errno = NODIRECT FILTER libnsl.so.1; __hostalias; hstrerror; __p_cdname; diff --git a/usr/src/lib/librt/amd64/mapfile-vers b/usr/src/lib/librt/amd64/mapfile-vers index c7120c1d89..c60e5a140e 100644 --- a/usr/src/lib/librt/amd64/mapfile-vers +++ b/usr/src/lib/librt/amd64/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -52,12 +52,12 @@ SUNW_1.3 { SUNW_1.2 { global: - close = FUNCTION; + close = NODIRECT FUNCTION; } SUNW_1.1; SUNW_1.1 { global: - fork = FUNCTION; + fork = NODIRECT FUNCTION; } SUNW_0.7; SUNW_0.7 { diff --git a/usr/src/lib/librt/i386/mapfile-vers b/usr/src/lib/librt/i386/mapfile-vers index 4c88b3471c..db79a89e00 100644 --- a/usr/src/lib/librt/i386/mapfile-vers +++ b/usr/src/lib/librt/i386/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -53,7 +53,7 @@ SUNW_1.3 { SUNW_1.2 { global: - close = FUNCTION; + close = NODIRECT FUNCTION; } SUNW_1.1; SUNW_1.1 { @@ -65,7 +65,7 @@ SUNW_1.1 { aio_return64 = FUNCTION; aio_suspend64 = FUNCTION; aio_write64 = FUNCTION; - fork = FUNCTION; + fork = NODIRECT FUNCTION; lio_listio64 = FUNCTION; } SUNW_0.7; diff --git a/usr/src/lib/librt/sparc/mapfile-vers b/usr/src/lib/librt/sparc/mapfile-vers index 4c88b3471c..db79a89e00 100644 --- a/usr/src/lib/librt/sparc/mapfile-vers +++ b/usr/src/lib/librt/sparc/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -53,7 +53,7 @@ SUNW_1.3 { SUNW_1.2 { global: - close = FUNCTION; + close = NODIRECT FUNCTION; } SUNW_1.1; SUNW_1.1 { @@ -65,7 +65,7 @@ SUNW_1.1 { aio_return64 = FUNCTION; aio_suspend64 = FUNCTION; aio_write64 = FUNCTION; - fork = FUNCTION; + fork = NODIRECT FUNCTION; lio_listio64 = FUNCTION; } SUNW_0.7; diff --git a/usr/src/lib/librt/sparcv9/mapfile-vers b/usr/src/lib/librt/sparcv9/mapfile-vers index c7120c1d89..c60e5a140e 100644 --- a/usr/src/lib/librt/sparcv9/mapfile-vers +++ b/usr/src/lib/librt/sparcv9/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -52,12 +52,12 @@ SUNW_1.3 { SUNW_1.2 { global: - close = FUNCTION; + close = NODIRECT FUNCTION; } SUNW_1.1; SUNW_1.1 { global: - fork = FUNCTION; + fork = NODIRECT FUNCTION; } SUNW_0.7; SUNW_0.7 { diff --git a/usr/src/lib/libxnet/common/mapfile-vers b/usr/src/lib/libxnet/common/mapfile-vers index ab438c0c3e..9025f98d87 100644 --- a/usr/src/lib/libxnet/common/mapfile-vers +++ b/usr/src/lib/libxnet/common/mapfile-vers @@ -118,7 +118,7 @@ SUNW_1.1 { getservent = FUNCTION FILTER libsocket.so.1; getsockname = FUNCTION FILTER libsocket.so.1; getsockopt = FUNCTION FILTER libsocket.so.1; - h_errno = FILTER libnsl.so.1; + h_errno = NODIRECT FILTER libnsl.so.1; htonl = FUNCTION FILTER libc.so.1; htons = FUNCTION FILTER libc.so.1; inet_addr = FUNCTION FILTER libnsl.so.1; |