aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/recordmcount.pl8
1 files changed, 3 insertions, 5 deletions
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index 7265a7dcac4b..884776a6e01a 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -348,9 +348,7 @@ my $offset = 0; # offset of ref_func to section beginning
348# 348#
349sub update_funcs 349sub update_funcs
350{ 350{
351 return if ($#offsets < 0); 351 return unless ($ref_func and @offsets);
352
353 defined($ref_func) || die "No function to reference";
354 352
355 # A section only had a weak function, to represent it. 353 # A section only had a weak function, to represent it.
356 # Unfortunately, a weak function may be overwritten by another 354 # Unfortunately, a weak function may be overwritten by another
@@ -425,7 +423,7 @@ while (<IN>) {
425 $read_function = 0; 423 $read_function = 0;
426 } 424 }
427 # print out any recorded offsets 425 # print out any recorded offsets
428 update_funcs() if (defined($ref_func)); 426 update_funcs();
429 427
430 # reset all markers and arrays 428 # reset all markers and arrays
431 $text_found = 0; 429 $text_found = 0;
@@ -462,7 +460,7 @@ while (<IN>) {
462} 460}
463 461
464# dump out anymore offsets that may have been found 462# dump out anymore offsets that may have been found
465update_funcs() if (defined($ref_func)); 463update_funcs();
466 464
467# If we did not find any mcount callers, we are done (do nothing). 465# If we did not find any mcount callers, we are done (do nothing).
468if (!$opened) { 466if (!$opened) {