From 240f2f8f42f57b46788379e0072836cb2cb40c8c Mon Sep 17 00:00:00 2001 From: Nathan Chancellor Date: Wed, 21 Jul 2021 20:39:33 -0700 Subject: [PATCH] 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: 93185a915514 ("ANDROID: init: ensure initcall ordering with LTO") Link: https://github.com/llvm/llvm-project/commit/96e9bc42447531a20569e0a680c029837a4868d8 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 --- scripts/generate_initcall_order.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/generate_initcall_order.pl b/scripts/generate_initcall_order.pl index f772b4a01caa..bbae9398bca8 100755 --- a/scripts/generate_initcall_order.pl +++ b/scripts/generate_initcall_order.pl @@ -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 = {};