From 63a9c774fd45ffd7bd7e93df3524c2caebe8f111 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@collabora.com> Date: Wed, 11 Mar 2020 18:55:40 +0000 Subject: [PATCH] inspect-library: Ignore symbols like LIBATOMIC_1.0@LIBATOMIC_1.0 I had hoped that dlsym() and dlvsym() would find these special symbols, but in fact they don't. To check for ABI compatibility we need to look for specific symbols, like __atomic_load_1@LIBATOMIC_1.0. Signed-off-by: Simon McVittie <smcv@collabora.com> --- helpers/inspect-library.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/helpers/inspect-library.c b/helpers/inspect-library.c index 1196bb9a6..b0d5b895e 100644 --- a/helpers/inspect-library.c +++ b/helpers/inspect-library.c @@ -329,7 +329,13 @@ main (int argc, } else { - if (!has_versioned_symbol (handle, symbol, version)) + if (strcmp (symbol, version) == 0) + { + /* Ignore: dlsym() and dlvsym() don't find the + * special symbol representing the version itself, + * because it is neither data nor code. */ + } + else if (!has_versioned_symbol (handle, symbol, version)) { char * merged_string; asprintf_or_die (&merged_string, "%s@%s", symbol, version); -- GitLab