Skip to content

Commit e8cf981

Browse files
Amerigo Wangmichal42
authored andcommitted
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>
1 parent 43f683c commit e8cf981

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

‎scripts/namespace.pl‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ sub do_nm
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
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
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
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_/ &&

0 commit comments

Comments
 (0)