Print this page
9139 check_rtime should be able to forbid libraries
9140 check_rtime should learn libnsl is safe now
9141 check_rtime exceptions could be cleaner

@@ -94,10 +94,16 @@
 #       data segments.
 #
 #   EXEC_STACK
 #       Objects that are not required to have a non-executable stack
 #
+#   FORBIDDEN_DEP
+#       Objects allowed to link to 'forbidden' objects
+#
+#   FORBIDDEN
+#       Objects to which nobody not excepted with FORBIDDEN_DEP may link
+#
 #   NOCRLEALT
 #       Objects that should be skipped by AltObjectConfig() when building
 #       the crle script that maps objects to the proto area.
 #
 #    NODIRECT

@@ -136,11 +142,11 @@
 #    UNUSED_RPATH
 #       Objects with unused runpaths
 #
 
 use vars  qw($EXRE_exec_data $EXRE_exec_stack $EXRE_nocrlealt);
-use vars  qw($EXRE_nodirect $EXRE_nosymsort);
+use vars  qw($EXRE_nodirect $EXRE_nosymsort $EXRE_forbidden_dep $EXRE_forbidden);
 use vars  qw($EXRE_olddep $EXRE_skip $EXRE_stab $EXRE_textrel $EXRE_undef_ref);
 use vars  qw($EXRE_unref_obj $EXRE_unused_deps $EXRE_unused_obj);
 use vars  qw($EXRE_unused_rpath);
 
 use strict;

@@ -441,10 +447,11 @@
                         }
                         $Line =~ s/^[ \t]*(.*)/\t$1\t<remove search path?>/;
                         onbld_elfmod::OutMsg($ErrFH, $ErrTtl, $RelPath, $Line);
                         next;
                 }
+                
                 # Look for unreferenced dependencies.  Note, if any unreferenced
                 # objects are ignored, then set $UnDep so as to suppress any
                 # associated unused-object messages.
                 if ($Line =~ /unreferenced object=/) {
                         if (defined($EXRE_unref_obj) &&

@@ -575,11 +582,21 @@
                         my($Need) = (split(' ', $Line))[3];
 
                         if (defined($EXRE_olddep) && ($Need =~ $EXRE_olddep)) {
                                 # Catch any old (unnecessary) dependencies.
                                 onbld_elfmod::OutMsg($ErrFH, $ErrTtl, $RelPath,
-                        "NEEDED=$Need\t<dependency no longer necessary>");
+                                    "NEEDED=$Need\t<dependency no " .
+                                    "longer necessary>");
+                        } elsif (defined($EXRE_forbidden) && 
+                            ($Need =~ $EXRE_forbidden)) {
+                                next if defined($EXRE_forbidden_dep) &&
+                                    ($FullPath =~ $EXRE_forbidden_dep);
+
+                                onbld_elfmod::OutMsg($ErrFH, $ErrTtl, $RelPath, 
+                                    "NEEDED=$Need\t<forbidden dependency, " .
+                                    "missing -nodefaultlibs?>");
+                                next;
                         } elsif ($opt{i}) {
                                 # Under the -i (information) option print out
                                 # any useful dynamic entries.
                                 onbld_elfmod::OutMsg($InfoFH, $InfoTtl, $RelPath,
                                     "NEEDED=$Need");