From patchwork Thu Sep 30 06:28:57 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amerigo Wang X-Patchwork-Id: 218932 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8U6PTjp030725 for ; Thu, 30 Sep 2010 06:25:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754516Ab0I3GYv (ORCPT ); Thu, 30 Sep 2010 02:24:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22419 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754426Ab0I3GYt (ORCPT ); Thu, 30 Sep 2010 02:24:49 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o8U6OfF1002332 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 30 Sep 2010 02:24:41 -0400 Received: from cr0.nay.redhat.com (dhcp-65-177.nay.redhat.com [10.66.65.177]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o8U6OM0o001884; Thu, 30 Sep 2010 02:24:39 -0400 From: Amerigo Wang To: linux-kbuild@vger.kernel.org Cc: Amerigo Wang , Stephen Hemminger , Andrew Morton , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 3/4] Some bug fixes for namespace.pl Date: Thu, 30 Sep 2010 14:28:57 +0800 Message-Id: <1285828138-5873-3-git-send-email-amwang@redhat.com> In-Reply-To: <1285828138-5873-1-git-send-email-amwang@redhat.com> References: <1285828138-5873-1-git-send-email-amwang@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 30 Sep 2010 06:25:30 +0000 (UTC) diff --git a/scripts/namespace.pl b/scripts/namespace.pl index c8d0922..bccf610 100755 --- a/scripts/namespace.pl +++ b/scripts/namespace.pl @@ -266,6 +266,7 @@ sub do_nm # T global label/procedure # U external reference # W weak external reference to text that has been resolved + # V similar to W, but the value of the weak symbol becomes zero with no error. # a assembler equate # b static variable, uninitialised # d static variable, initialised @@ -274,8 +275,9 @@ sub do_nm # s static variable, uninitialised, small bss # t static label/procedures # w weak external reference to text that has not been resolved + # v similar to w # ? undefined type, used a lot by modules - if ($type !~ /^[ABCDGRSTUWabdgrstw?]$/) { + if ($type !~ /^[ABCDGRSTUWVabdgrstwv?]$/) { printf STDERR "nm output for $fullname contains unknown type '$_'\n"; } elsif ($name =~ /\./) { @@ -286,7 +288,7 @@ sub do_nm # binutils keeps changing the type for exported symbols, force it to R $type = 'R' if ($name =~ /^__ksymtab/ || $name =~ /^__kstrtab/); $name =~ s/_R[a-f0-9]{8}$//; # module versions adds this - if ($type =~ /[ABCDGRSTW]/ && + if ($type =~ /[ABCDGRSTWV]/ && $name ne 'init_module' && $name ne 'cleanup_module' && $name ne 'Using_Versions' && @@ -353,11 +355,12 @@ sub list_multiply_defined foreach my $name (keys(%def)) { if ($#{$def{$name}} > 0) { # Special case for cond_syscall - if ($#{$def{$name}} == 1 && $name =~ /^sys_/ && - ($def{$name}[0] eq "kernel/sys.o" || - $def{$name}[1] eq "kernel/sys.o")) { - &drop_def("kernel/sys.o", $name); - next; + if ($#{$def{$name}} == 1 && $name =~ /^sys_/) { + if($def{$name}[0] eq "kernel/sys_ni.o" || + $def{$name}[1] eq "kernel/sys_ni.o") { + &drop_def("kernel/sys_ni.o", $name); + next; + } } # Special case for i386 entry code if ($#{$def{$name}} == 1 && $name =~ /^__kernel_/ &&