scripts: override locale from environment when running recordmcount.pl
authorDaniel Dadap <ddadap@nvidia.com>
Sat, 27 Apr 2019 15:21:34 +0000 (11:21 -0400)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 3 May 2019 14:05:01 +0000 (23:05 +0900)
recordmcount.pl uses a set of regular expressions to parse the output of
objdump(1). However, if objdump(1) output is localized, it may not match
the regular expressions, thereby preventing recordmcount.pl from parsing
object files correctly.

In order to allow recordmcount.pl to function correctly regardless of the
current locale settings, set LANG=C when running objdump(1). LC_ALL is
already unset in the top-level Makefile, so it is not necessary to also
override that environment variable.

Signed-off-by: Daniel Dadap <ddadap@nvidia.com>
Reviewed-by: Robert Morell <rmorell@nvidia.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
scripts/recordmcount.pl

index 68841d01162cff667d3e33fec14120b355f23413..ffea46287f8304f17f4655c4a05922af3eb5b03c 100755 (executable)
@@ -493,7 +493,7 @@ sub update_funcs
 #
 # Step 2: find the sections and mcount call sites
 #
-open(IN, "$objdump -hdr $inputfile|") || die "error running $objdump";
+open(IN, "LANG=C $objdump -hdr $inputfile|") || die "error running $objdump";
 
 my $text;