trivial: remove references to non-existent include/linux/config.h
[safe/jmp/linux-2.6] / scripts / recordmcount.pl
index d29baa2..090d300 100755 (executable)
@@ -57,7 +57,6 @@
 #        call mcount  (offset: 0x5)
 #        [...]
 #        ret
-#  .globl my_func
 #  other_func:
 #        [...]
 #        call mcount (offset: 0x1b)
@@ -393,7 +392,7 @@ while (<IN>) {
            $read_function = 0;
        }
        # print out any recorded offsets
-       update_funcs() if ($text_found);
+       update_funcs() if (defined($ref_func));
 
        # reset all markers and arrays
        $text_found = 0;
@@ -414,7 +413,10 @@ while (<IN>) {
            $offset = hex $1;
        } else {
            # if we already have a function, and this is weak, skip it
-           if (!defined($ref_func) && !defined($weak{$text})) {
+           if (!defined($ref_func) && !defined($weak{$text}) &&
+                # PPC64 can have symbols that start with .L and
+                # gcc considers these special. Don't use them!
+                $text !~ /^\.L/) {
                $ref_func = $text;
                $offset = hex $1;
            }
@@ -441,7 +443,7 @@ while (<IN>) {
 }
 
 # dump out anymore offsets that may have been found
-update_funcs() if ($text_found);
+update_funcs() if (defined($ref_func));
 
 # If we did not find any mcount callers, we are done (do nothing).
 if (!$opened) {