History

tracing: Check absolute path of input file in recordmcount.pl

The ftrace.c file may reference the mcount function and this may interfere with the recordmcount.pl processing. To avoid this, the code does not process the kernel/trace/ftrace.o. But currently the check is against a relative path. This patch modifies the check to succeed if the path is an absolute path.

Li Hong committed 17 years ago

Commit bdd3b051 parent e2d753f1 file · +1 −1Browse files

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

Unified · Split

scripts/recordmcount.pl+1−1
@@ -123,7 +123,7 @@ my ($arch, $bits, $objdump, $objcopy, $cc, · 122 unmodified lines
123 $ld, $nm, $rm, $mv, $is_module, $inputfile) = @ARGV;123 $ld, $nm, $rm, $mv, $is_module, $inputfile) = @ARGV;
124 124
125# This file refers to mcount and shouldn't be ftraced, so lets' ignore it125# This file refers to mcount and shouldn't be ftraced, so lets' ignore it
126if ($inputfile eq "kernel/trace/ftrace.o") {126if ($inputfile =~ m,kernel/trace/ftrace\.o$,) {
127 exit(0);127 exit(0);
128}128}
129 129