diff options
Diffstat (limited to 'scripts/gen_symbol_version_map.awk')
-rw-r--r-- | scripts/gen_symbol_version_map.awk | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/scripts/gen_symbol_version_map.awk b/scripts/gen_symbol_version_map.awk index 5feb44f..d81fcd1 100644 --- a/scripts/gen_symbol_version_map.awk +++ b/scripts/gen_symbol_version_map.awk @@ -8,11 +8,30 @@ BEGIN { if ($8 ~ sym_regex) { split($8, symbol_array, /@|@@/); + # Don't add local symbols of versioned libc's + if (VERSIONED_LIBC && !symbol_array[2]) + continue; + # Handle non-versioned libc's like uClibc ... if (!symbol_array[2]) symbol_array[2] = ""; + else + # We have a versioned libc + VERSIONED_LIBC = 1; - SYMBOL_LIST[symbol_array[2]] = SYMBOL_LIST[symbol_array[2]] " " symbol_array[1]; + ADD = 1; + # Check that we do not add duplicates + for (x in PROCESSED_SYMBOLS) { + if (x == $8) { + ADD = 0; + break; + } + } + + if (ADD) { + SYMBOL_LIST[symbol_array[2]] = SYMBOL_LIST[symbol_array[2]] " " symbol_array[1]; + PROCESSED_SYMBOLS[$8] = $8; + } } } } |