aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/namespace.pl
diff options
context:
space:
mode:
authorAmerigo Wang <amwang@redhat.com>2010-10-27 15:42:01 -0400
committerMichal Marek <mmarek@suse.cz>2010-10-27 18:07:46 -0400
commite8cf981346b78ee50c2bfce83be9ee55704b3d4f (patch)
treec559deca7c65044c8d1d038449443d4635640c50 /scripts/namespace.pl
parent43f683c9e465a64259c6058a7c313facc697b203 (diff)
scripts/namespace.pl: some bug fixes
1. Teach namespace.pl to understand "V" and "v" 2. cond_syscalls are moved into kernel/sys_ni.c Signed-off-by: Amerigo Wang <amwang@redhat.com> Cc: Stephen Hemminger <shemminger@vyatta.com> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/namespace.pl')
-rwxr-xr-xscripts/namespace.pl17
1 files changed, 10 insertions, 7 deletions
diff --git a/scripts/namespace.pl b/scripts/namespace.pl
index c8d0922c3b4f..bccf61044eda 100755
--- a/scripts/namespace.pl
+++ b/scripts/namespace.pl
@@ -266,6 +266,7 @@ sub do_nm
266 # T global label/procedure 266 # T global label/procedure
267 # U external reference 267 # U external reference
268 # W weak external reference to text that has been resolved 268 # W weak external reference to text that has been resolved
269 # V similar to W, but the value of the weak symbol becomes zero with no error.
269 # a assembler equate 270 # a assembler equate
270 # b static variable, uninitialised 271 # b static variable, uninitialised
271 # d static variable, initialised 272 # d static variable, initialised
@@ -274,8 +275,9 @@ sub do_nm
274 # s static variable, uninitialised, small bss 275 # s static variable, uninitialised, small bss
275 # t static label/procedures 276 # t static label/procedures
276 # w weak external reference to text that has not been resolved 277 # w weak external reference to text that has not been resolved
278 # v similar to w
277 # ? undefined type, used a lot by modules 279 # ? undefined type, used a lot by modules
278 if ($type !~ /^[ABCDGRSTUWabdgrstw?]$/) { 280 if ($type !~ /^[ABCDGRSTUWVabdgrstwv?]$/) {
279 printf STDERR "nm output for $fullname contains unknown type '$_'\n"; 281 printf STDERR "nm output for $fullname contains unknown type '$_'\n";
280 } 282 }
281 elsif ($name =~ /\./) { 283 elsif ($name =~ /\./) {
@@ -286,7 +288,7 @@ sub do_nm
286 # binutils keeps changing the type for exported symbols, force it to R 288 # binutils keeps changing the type for exported symbols, force it to R
287 $type = 'R' if ($name =~ /^__ksymtab/ || $name =~ /^__kstrtab/); 289 $type = 'R' if ($name =~ /^__ksymtab/ || $name =~ /^__kstrtab/);
288 $name =~ s/_R[a-f0-9]{8}$//; # module versions adds this 290 $name =~ s/_R[a-f0-9]{8}$//; # module versions adds this
289 if ($type =~ /[ABCDGRSTW]/ && 291 if ($type =~ /[ABCDGRSTWV]/ &&
290 $name ne 'init_module' && 292 $name ne 'init_module' &&
291 $name ne 'cleanup_module' && 293 $name ne 'cleanup_module' &&
292 $name ne 'Using_Versions' && 294 $name ne 'Using_Versions' &&
@@ -353,11 +355,12 @@ sub list_multiply_defined
353 foreach my $name (keys(%def)) { 355 foreach my $name (keys(%def)) {
354 if ($#{$def{$name}} > 0) { 356 if ($#{$def{$name}} > 0) {
355 # Special case for cond_syscall 357 # Special case for cond_syscall
356 if ($#{$def{$name}} == 1 && $name =~ /^sys_/ && 358 if ($#{$def{$name}} == 1 && $name =~ /^sys_/) {
357 ($def{$name}[0] eq "kernel/sys.o" || 359 if($def{$name}[0] eq "kernel/sys_ni.o" ||
358 $def{$name}[1] eq "kernel/sys.o")) { 360 $def{$name}[1] eq "kernel/sys_ni.o") {
359 &drop_def("kernel/sys.o", $name); 361 &drop_def("kernel/sys_ni.o", $name);
360 next; 362 next;
363 }
361 } 364 }
362 # Special case for i386 entry code 365 # Special case for i386 entry code
363 if ($#{$def{$name}} == 1 && $name =~ /^__kernel_/ && 366 if ($#{$def{$name}} == 1 && $name =~ /^__kernel_/ &&