summaryrefslogtreecommitdiff
path: root/scripts/recordmcount.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/recordmcount.pl')
-rwxr-xr-xscripts/recordmcount.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index 16c5563b4129..d29baa2e063a 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -403,7 +403,6 @@ while (<IN>) {
# section found, now is this a start of a function?
} elsif ($read_function && /$function_regex/) {
$text_found = 1;
- $offset = hex $1;
$text = $2;
# if this is either a local function or a weak function
@@ -412,10 +411,12 @@ while (<IN>) {
if (!defined($locals{$text}) && !defined($weak{$text})) {
$ref_func = $text;
$read_function = 0;
+ $offset = hex $1;
} else {
# if we already have a function, and this is weak, skip it
if (!defined($ref_func) && !defined($weak{$text})) {
$ref_func = $text;
+ $offset = hex $1;
}
}
} elsif ($read_headers && /$mcount_section/) {