summaryrefslogtreecommitdiff
path: root/elf/dl-lookup.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-lookup.c')
-rw-r--r--elf/dl-lookup.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index 15da23d95c..4cc1f2d468 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -151,10 +151,12 @@ do_lookup (const char *undef_name, unsigned long int hash,
}
else
{
- /* We can match the version information. */
+ /* We can match the version information or use the
+ default one. */
ElfW(Half) ndx = verstab[symidx] & 0x7fff;
- if (map->l_versions[ndx].hash != version->hash
- || strcmp (map->l_versions[ndx].name, version->name))
+ if ((map->l_versions[ndx].hash != version->hash
+ || strcmp (map->l_versions[ndx].name, version->name))
+ && (version->hidden || map->l_versions[ndx].hash))
/* It's not the version we want. */
continue;
}