diff options
author | Florian Weimer <fweimer@redhat.com> | 2019-10-29 12:07:35 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2019-10-29 12:07:35 +0100 |
commit | aae3acbaa7cf9ebba084bc4ae0f2c56bad425b89 (patch) | |
tree | cb61d00e03d95f2fa39ca7134ce078be07b6c386 | |
parent | 177a3d48a1c74d7b2cd6bfd48901519d25a5ecad (diff) | |
download | glibc-aae3acbaa7cf9ebba084bc4ae0f2c56bad425b89.tar.gz glibc-aae3acbaa7cf9ebba084bc4ae0f2c56bad425b89.tar.xz glibc-aae3acbaa7cf9ebba084bc4ae0f2c56bad425b89.zip |
Clarify purpose of assert in _dl_lookup_symbol_x
-rw-r--r-- | elf/dl-lookup.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c index fd44cd4101..aaaf43799e 100644 --- a/elf/dl-lookup.c +++ b/elf/dl-lookup.c @@ -792,11 +792,9 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map, bump_num_relocations (); - /* No other flag than DL_LOOKUP_ADD_DEPENDENCY or DL_LOOKUP_GSCOPE_LOCK - is allowed if we look up a versioned symbol. */ - assert (version == NULL - || (flags & ~(DL_LOOKUP_ADD_DEPENDENCY | DL_LOOKUP_GSCOPE_LOCK)) - == 0); + /* DL_LOOKUP_RETURN_NEWEST does not make sense for versioned + lookups. */ + assert (version == NULL || !(flags & DL_LOOKUP_RETURN_NEWEST)); size_t i = 0; if (__glibc_unlikely (skip_map != NULL)) |