From 9a990aaba82fb1e1e718c2485ca388d908c85ad7 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 2 Jun 2006 21:30:40 +0000 Subject: [PATCH] =?UTF-8?q?Patch=20from=20Atsushi=20Nemoto:=20This=20patch?= =?UTF-8?q?=20make=20depmod.pl=20more=20robust=20in=20cross=20environment.?= =?UTF-8?q?=20=C2=A0If=20native=20nm=20did=20not=20recognize=20target's=20?= =?UTF-8?q?object,=20you=20can=20override=20it=20with=20NM=20environment?= =?UTF-8?q?=20variable.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/depmod.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/depmod.pl b/examples/depmod.pl index 0e66ee3eb..19eca80eb 100755 --- a/examples/depmod.pl +++ b/examples/depmod.pl @@ -25,6 +25,7 @@ my $kernelsyms=""; my $stdout=0; my $verbose=0; my $help=0; +my $nm = $ENV{'NM'} || "nm"; # more globals my (@liblist) = (); @@ -104,7 +105,7 @@ foreach my $obj ( @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); } @@ -112,7 +113,7 @@ foreach my $obj ( @liblist ){ # 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);