diff options
-rwxr-xr-x | scripts/recordmcount.pl | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl index 884776a6e01a..a4e2435d4821 100755 --- a/scripts/recordmcount.pl +++ b/scripts/recordmcount.pl | |||
@@ -350,15 +350,11 @@ sub update_funcs | |||
350 | { | 350 | { |
351 | return unless ($ref_func and @offsets); | 351 | return unless ($ref_func and @offsets); |
352 | 352 | ||
353 | # A section only had a weak function, to represent it. | 353 | # Sanity check on weak function. A weak function may be overwritten by |
354 | # Unfortunately, a weak function may be overwritten by another | 354 | # another function of the same name, making all these offsets incorrect. |
355 | # function of the same name, making all these offsets incorrect. | ||
356 | # To be safe, we simply print a warning and bail. | ||
357 | if (defined $weak{$ref_func}) { | 355 | if (defined $weak{$ref_func}) { |
358 | print STDERR | 356 | die "$inputfile: ERROR: referencing weak function" . |
359 | "$inputfile: WARNING: referencing weak function" . | ||
360 | " $ref_func for mcount\n"; | 357 | " $ref_func for mcount\n"; |
361 | return; | ||
362 | } | 358 | } |
363 | 359 | ||
364 | # is this function static? If so, note this fact. | 360 | # is this function static? If so, note this fact. |