summaryrefslogtreecommitdiff
path: root/scripts/namespace.pl
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2010-10-13 15:58:30 -0700
committerMichal Marek <mmarek@suse.cz>2010-10-28 00:29:48 +0200
commit24a54f7974a616385b96cd939e004592e2cea484 (patch)
treee5f1dc91f55ec6396eac077e9a8cf3577bc13af7 /scripts/namespace.pl
parent532cf2907ac3b9c2345d76251764f4f4e602c921 (diff)
downloadkernel-common-24a54f7974a616385b96cd939e004592e2cea484.tar.gz
kernel-common-24a54f7974a616385b96cd939e004592e2cea484.tar.bz2
kernel-common-24a54f7974a616385b96cd939e004592e2cea484.zip
namespace: add source file location exceptions
Teach namespace checker about some special case files where the source is in unusual location. This fixes many of the source file not found errors (more can be added), and also prevents false positives for functions not being used. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/namespace.pl')
-rwxr-xr-xscripts/namespace.pl24
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/namespace.pl b/scripts/namespace.pl
index a71be6b7cdec..fd2d946fae23 100755
--- a/scripts/namespace.pl
+++ b/scripts/namespace.pl
@@ -141,6 +141,26 @@ my %nameexception = (
'VDSO32_sigreturn' => 1,
);
+# Files with exceptions to source file location
+my %sourceloc = (
+ 'net/dccp/dccp_probe.o' => 'probe',
+ 'net/dccp/dccp_ipv4.o' => 'ipv4',
+ 'net/dccp/dccp_ipv6.o' => 'ipv6',
+ 'net/dccp/dccp_diag.o' => 'diag',
+ 'drivers/char/hw_random/rng-core.o' => 'core',
+ 'fs/fat/msdos.o' => 'namei_msdos',
+ 'fs/fat/vfat.o' => 'namei_vfat',
+ 'fs/nfs_common/nfs_acl.o' => 'nfsacl',
+ 'sound/soundcore.o' => 'sound_core',
+ 'drivers/md/dm-mirror.o' => 'dm-raid1',
+ 'drivers/message/i2o/i2o_bus.o' => 'bus-osm',
+ 'arch/x86/kvm/kvm-amd.o' => 'svm',
+ 'arch/x86/kvm/kvm-intel.o' => 'vmx',
+ 'arch/x86/crypto/twofish-x86_64.o' => 'twofish-x86_64-asm_64',
+ 'arch/x86/crypto/aes-x86_64.o' => 'aes-x86_64-asm_64',
+ 'arch/x86/crypto/aesni-intel.o' => 'aesni-intel_asm',
+ 'arch/x86/crypto/salsa20-x86_64.o' => 'salsa20-x86_64-asm_64',
+);
&find(\&linux_objects, '.'); # find the objects and do_nm on them
&list_multiply_defined();
@@ -228,11 +248,15 @@ sub do_nm
return;
}
($source = $basename) =~ s/\.o$//;
+
+ $source = $sourceloc{$fullname} if ($sourceloc{$fullname});
+
if (-e "$source.c" || -e "$source.S") {
$source = "$objtree$File::Find::dir/$source";
} else {
$source = "$srctree$File::Find::dir/$source";
}
+
if (! -e "$source.c" && ! -e "$source.S") {
# No obvious source, exclude the object if it is conglomerate
open(my $objdumpdata, "$objdump $basename|")