]> git.ipfire.org Git - thirdparty/kernel/linux.git/blobdiff - scripts/recordmcount.pl
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[thirdparty/kernel/linux.git] / scripts / recordmcount.pl
index f599031260d5178d10dd83554ac20d957c8b82af..68841d01162cff667d3e33fec14120b355f23413 100755 (executable)
@@ -142,6 +142,11 @@ my %text_sections = (
      ".text.unlikely" => 1,
 );
 
+# Acceptable section-prefixes to record.
+my %text_section_prefixes = (
+     ".text." => 1,
+);
+
 # Note: we are nice to C-programmers here, thus we skip the '||='-idiom.
 $objdump = 'objdump' if (!$objdump);
 $objcopy = 'objcopy' if (!$objcopy);
@@ -519,6 +524,14 @@ while (<IN>) {
 
        # Only record text sections that we know are safe
        $read_function = defined($text_sections{$1});
+       if (!$read_function) {
+           foreach my $prefix (keys %text_section_prefixes) {
+               if (substr($1, 0, length $prefix) eq $prefix) {
+                   $read_function = 1;
+                   last;
+               }
+           }
+       }
        # print out any recorded offsets
        update_funcs();