This patch make depmod.pl more robust in cross environment. If native
nm did not recognize target's object, you can override it with NM
environment variable.
my $stdout=0;
my $verbose=0;
my $help=0;
+my $nm = $ENV{'NM'} || "nm";
# more globals
my (@liblist) = ();
warn "\nMODULE = $tgtname\n" if $verbose;
# get a list of symbols
- my @output=`nm $obj`;
+ my @output=`$nm $obj`;
build_ref_tables($tgtname, \@output, $exp, $dep);
}
# vmlinux is a special name that is only used to resolve symbols
my $tgtname = 'vmlinux';
-my @output = $kernelsyms ? `cat $kernelsyms` : `nm $kernel`;
+my @output = $kernelsyms ? `cat $kernelsyms` : `$nm $kernel`;
warn "\nMODULE = $tgtname\n" if $verbose;
build_ref_tables($tgtname, \@output, $exp, $dep);