Skip to content
Snippets Groups Projects
Commit b98b1448 authored by Simon McVittie's avatar Simon McVittie
Browse files

library-cmp: When listing symbols, ignore the name of each verdef


Conventionally, for each version definition in a shared library, there
is a symbol named after the verdef with absolute value 0. For example,
libdbus has a symbol LIBDBUS_1_3@LIBDBUS_1_3, and similarly libxkbcommon
has symbols V_0.8.0@V_0.8.0 and so on.

These will typically not match any of the glob patterns that we use to
mark symbols as being public or private, leading to spurious warnings
like this one:

    i386-linux-gnu-capsule-capture-libs: warning: we are assuming "V_0.5.0" to be private, but it's just a guess

So far, we have avoided this because we have not used the "symbols"
comparison order for any library that has verdefs, but I'm intending
to use "versions,name,symbols" for libxkbcommon.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent f87c1373
Branches
Tags
No related merge requests found
...@@ -957,6 +957,12 @@ get_symbols ( Elf *elf, size_t *symbols_number, int *code, char **message ) ...@@ -957,6 +957,12 @@ get_symbols ( Elf *elf, size_t *symbols_number, int *code, char **message )
{ {
const char *version = elf_strptr( elf, shdr->sh_link, aux->vda_name ); const char *version = elf_strptr( elf, shdr->sh_link, aux->vda_name );
char *symbol_versioned; char *symbol_versioned;
/* Ignore the placeholder for the name of the verdef itself,
* e.g. LIBDBUS_1_3@LIBDBUS_1_3 */
if( strcmp( symbol, version ) == 0 )
continue;
xasprintf( &symbol_versioned, "%s@%s", symbol, version ); xasprintf( &symbol_versioned, "%s@%s", symbol, version );
ptr_list_push_ptr( symbols_list, symbol_versioned ); ptr_list_push_ptr( symbols_list, symbol_versioned );
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment