From f4011fc8aedfcbcec01ce8ad9c91d4678de0c5ce Mon Sep 17 00:00:00 2001 From: Ramji Jiyani Date: Thu, 2 Feb 2023 08:13:38 +0000 Subject: [PATCH] ANDROID: GKI: Remove duplicates from symbol lists scripts/gen_gki_modules_headers.sh: Add an option to only keep unique symbols during the symbol list prep phase as for header generation symbol list needs to be unique union of all vendor symbol lists in an ascending order. This reduces the array size and improves the lookup time for the binary search. Bug: 232430739 Test: TH Fixes: 13e6a166514c ("ANDROID: GKI: Header generation fix and improvements") Change-Id: Ib6868f5a8eb0b3713e192bec111804e993e3d085 Signed-off-by: Ramji Jiyani (cherry picked from commit 2069048a7398dd0dfde60c2e9b0d720c1e62f87e) --- scripts/gen_gki_modules_headers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gen_gki_modules_headers.sh b/scripts/gen_gki_modules_headers.sh index c1074ebd59c0..a8fc0721237b 100755 --- a/scripts/gen_gki_modules_headers.sh +++ b/scripts/gen_gki_modules_headers.sh @@ -54,7 +54,7 @@ generate_header() { sed -i '/^[[:space:]]*$/d; /^#/d; /\[abi_symbol_list\]/d' "${symbol_file}" # Sort in byte order for kernel binary search at runtime - LC_ALL=C sort -o "${symbol_file}" "${symbol_file}" + LC_ALL=C sort -u -o "${symbol_file}" "${symbol_file}" # Trim white spaces & +1 for null termination local max_name_len=$(awk '