History

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

Amerigo Wang committed 16 years ago

Commit e8cf9811 parent 43f683c1 file · +10 −7Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/namespace.pl+10−7
@@ -266,6 +266,7 @@ sub do_nm · 265 unmodified lines
266266 # T global label/procedure
267267 # U external reference
268268 # 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.
269270 # a assembler equate
270271 # b static variable, uninitialised
271272 # d static variable, initialised
@@ -274,8 +275,9 @@ sub do_nm · 2 unmodified lines
274275 # s static variable, uninitialised, small bss
275276 # t static label/procedures
276277 # w weak external reference to text that has not been resolved
278+ # v similar to w
277279 # ? undefined type, used a lot by modules
278− if ($type !~ /^[ABCDGRSTUWabdgrstw?]$/) {
280+ if ($type !~ /^[ABCDGRSTUWVabdgrstwv?]$/) {
279281 printf STDERR "nm output for $fullname contains unknown type '$_'\n";
280282 }
281283 elsif ($name =~ /\./) {
@@ -286,7 +288,7 @@ sub do_nm · 4 unmodified lines
286288 # binutils keeps changing the type for exported symbols, force it to R
287289 $type = 'R' if ($name =~ /^__ksymtab/ || $name =~ /^__kstrtab/);
288290 $name =~ s/_R[a-f0-9]{8}$//; # module versions adds this
289− if ($type =~ /[ABCDGRSTW]/ &&
291+ if ($type =~ /[ABCDGRSTWV]/ &&
290292 $name ne 'init_module' &&
291293 $name ne 'cleanup_module' &&
292294 $name ne 'Using_Versions' &&
@@ -353,11 +355,12 @@ sub list_multiply_defined · 60 unmodified lines
353355 foreach my $name (keys(%def)) {
354356 if ($#{$def{$name}} > 0) {
355357 # Special case for cond_syscall
356− if ($#{$def{$name}} == 1 && $name =~ /^sys_/ &&
357− ($def{$name}[0] eq "kernel/sys.o" ||
358− $def{$name}[1] eq "kernel/sys.o")) {
359− &drop_def("kernel/sys.o", $name);
360− next;
358+ if ($#{$def{$name}} == 1 && $name =~ /^sys_/) {
359+ if($def{$name}[0] eq "kernel/sys_ni.o" ||
360+ $def{$name}[1] eq "kernel/sys_ni.o") {
361+ &drop_def("kernel/sys_ni.o", $name);
362+ next;
363+ }
361364 }
362365 # Special case for i386 entry code
363366 if ($#{$def{$name}} == 1 && $name =~ /^__kernel_/ &&