From 9d42e31b540490e902ee72837ee247a97f632ce6 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Thu, 9 Mar 2023 22:21:43 +0100 Subject: symbols-check: support OSes based on GNU toolchain Some of the symbols listed in PLATFORM_SYMBOLS are not only specific to Linux, but rather specific to the GNU toolchain. Hence, use them when inspecting ELF binaries produced by a GNU toolchain: this means on Hurd ('GNU'), and on e.g. kFreeBSD ('GNU/kFreeBSD'). Signed-off-by: Pino Toscano Part-of: --- bin/symbols-check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/symbols-check.py b/bin/symbols-check.py index 12c63812c9a..6049cbe2918 100644 --- a/bin/symbols-check.py +++ b/bin/symbols-check.py @@ -68,7 +68,7 @@ def get_symbols_nm(nm, lib): if len(fields) == 2 or fields[1] == 'U': continue symbol_name = fields[0] - if platform_name == 'Linux': + if platform_name == 'Linux' or platform_name == 'GNU' or platform_name.startswith('GNU/'): if symbol_name in PLATFORM_SYMBOLS: continue elif platform_name == 'Darwin': -- cgit v1.2.1