aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
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
commitabb438526201c6a79949ad45375c051b6681c253 (patch)
tree107b5354d68b2b9199abdd6b372608a3b0cda376 /scripts
parente8cf981346b78ee50c2bfce83be9ee55704b3d4f (diff)
scripts/namespace.pl: improve to get more correct results
Exclude more symbols from arch/x86/vdso/ and arch/x86/boot/; add some more linker-defined symbols into exception list; add other cond_syscalls besides "sys_*". 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')
-rwxr-xr-xscripts/namespace.pl21
1 files changed, 12 insertions, 9 deletions
diff --git a/scripts/namespace.pl b/scripts/namespace.pl
index bccf61044eda..a71be6b7cdec 100755
--- a/scripts/namespace.pl
+++ b/scripts/namespace.pl
@@ -133,6 +133,12 @@ my %nameexception = (
133 '__nosave_begin' => 1, 133 '__nosave_begin' => 1,
134 '__nosave_end' => 1, 134 '__nosave_end' => 1,
135 'pg0' => 1, 135 'pg0' => 1,
136 'vdso_enabled' => 1,
137 '__stack_chk_fail' => 1,
138 'VDSO32_PRELINK' => 1,
139 'VDSO32_vsyscall' => 1,
140 'VDSO32_rt_sigreturn'=>1,
141 'VDSO32_sigreturn' => 1,
136); 142);
137 143
138 144
@@ -157,7 +163,8 @@ sub linux_objects
157 if (/.*\.o$/ && 163 if (/.*\.o$/ &&
158 ! ( 164 ! (
159 m:/built-in.o$: 165 m:/built-in.o$:
160 || m:arch/x86/kernel/vsyscall-syms.o$: 166 || m:arch/x86/vdso/:
167 || m:arch/x86/boot/:
161 || m:arch/ia64/ia32/ia32.o$: 168 || m:arch/ia64/ia32/ia32.o$:
162 || m:arch/ia64/kernel/gate-syms.o$: 169 || m:arch/ia64/kernel/gate-syms.o$:
163 || m:arch/ia64/lib/__divdi3.o$: 170 || m:arch/ia64/lib/__divdi3.o$:
@@ -200,6 +207,7 @@ sub linux_objects
200 || m:^.*/\.tmp_: 207 || m:^.*/\.tmp_:
201 || m:^\.tmp_: 208 || m:^\.tmp_:
202 || m:/vmlinux-obj.o$: 209 || m:/vmlinux-obj.o$:
210 || m:^tools/:
203 ) 211 )
204 ) { 212 ) {
205 do_nm($basename, $_); 213 do_nm($basename, $_);
@@ -355,20 +363,15 @@ sub list_multiply_defined
355 foreach my $name (keys(%def)) { 363 foreach my $name (keys(%def)) {
356 if ($#{$def{$name}} > 0) { 364 if ($#{$def{$name}} > 0) {
357 # Special case for cond_syscall 365 # Special case for cond_syscall
358 if ($#{$def{$name}} == 1 && $name =~ /^sys_/) { 366 if ($#{$def{$name}} == 1 &&
367 ($name =~ /^sys_/ || $name =~ /^compat_sys_/ ||
368 $name =~ /^sys32_/)) {
359 if($def{$name}[0] eq "kernel/sys_ni.o" || 369 if($def{$name}[0] eq "kernel/sys_ni.o" ||
360 $def{$name}[1] eq "kernel/sys_ni.o") { 370 $def{$name}[1] eq "kernel/sys_ni.o") {
361 &drop_def("kernel/sys_ni.o", $name); 371 &drop_def("kernel/sys_ni.o", $name);
362 next; 372 next;
363 } 373 }
364 } 374 }
365 # Special case for i386 entry code
366 if ($#{$def{$name}} == 1 && $name =~ /^__kernel_/ &&
367 $def{$name}[0] eq "arch/x86/kernel/vsyscall-int80_32.o" &&
368 $def{$name}[1] eq "arch/x86/kernel/vsyscall-sysenter_32.o") {
369 &drop_def("arch/x86/kernel/vsyscall-sysenter_32.o", $name);
370 next;
371 }
372 375
373 printf "$name is multiply defined in :-\n"; 376 printf "$name is multiply defined in :-\n";
374 foreach my $module (@{$def{$name}}) { 377 foreach my $module (@{$def{$name}}) {