ANDROID: generate_initcall_order.pl: Use two dash long options for llvm-nm

Commit 96e9bc424475 ("[llvm-nm] Remove one-dash long options except
-arch") in LLVM removed the one dash long options, which causes this
script to fail and initcalls not to get ordered properly, which
manifests as kernels crashing durin boot.

Use the two dash long options as the LLVM commit mentions that the
documentation and help text have always shown them over the one dash
long versions. This is not an issue with the mainline LTO series as it
used two dash long options.

Change-Id: Iaef9f96af1d75b54eabc4bba38d2a3a58c3c2209
Fixes: 93185a9155 ("ANDROID: init: ensure initcall ordering with LTO")
Link: 96e9bc4244
Link: https://github.com/ClangBuiltLinux/continuous-integration2/runs/3129736977?check_suite_focus=true
Link: https://github.com/ClangBuiltLinux/continuous-integration2/runs/3129775494?check_suite_focus=true
Link: https://github.com/ClangBuiltLinux/continuous-integration2/runs/3129863440?check_suite_focus=true
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
This commit is contained in:
Nathan Chancellor 2021-07-21 20:39:33 -07:00
parent f24479d84c
commit e6f64a043b
No known key found for this signature in database
GPG key ID: 1D6B269171C01A96

View file

@ -41,7 +41,7 @@ sub find_initcalls {
die "$0: object file $object doesn't exist?" if (! -f $object);
open(my $fh, "\"$nm\" -just-symbol-name -defined-only \"$object\" 2>/dev/null |")
open(my $fh, "\"$nm\" --just-symbol-name --defined-only \"$object\" 2>/dev/null |")
or die "$0: failed to execute \"$nm\": $!";
my $initcalls = {};