summaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/Makefile2
-rw-r--r--elf/dl-lookup.c5
-rw-r--r--elf/genrtldtbl.awk3
3 files changed, 6 insertions, 4 deletions
diff --git a/elf/Makefile b/elf/Makefile
index 5f78c5cb1d..e608acf416 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -37,7 +37,7 @@ elide-routines.os = $(dl-routines) dl-support enbl-secure
rtld-routines := rtld $(dl-routines) dl-sysdep dl-minimal
distribute = $(rtld-routines:=.c) dynamic-link.h do-rel.h dl-machine.h \
dl-hash.h soinit.c sofini.c ldd.sh.in ldd.bash.in eval.c \
- genrtldtbl.awk
+ genrtldtbl.awk atomicity.h
extra-libs = libdl
extra-libs-others = $(extra-libs)
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index c51724026e..6da708109e 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -155,11 +155,12 @@ do_lookup (const char *undef_name, unsigned long int hash,
else
{
/* We can match the version information or use the
- default one. */
+ default one if it is not hidden. */
ElfW(Half) ndx = verstab[symidx] & 0x7fff;
if ((map->l_versions[ndx].hash != version->hash
|| strcmp (map->l_versions[ndx].name, version->name))
- && (version->hidden || map->l_versions[ndx].hash))
+ && (version->hidden || map->l_versions[ndx].hash
+ || (verstab[symidx] & 0x8000)))
/* It's not the version we want. */
continue;
}
diff --git a/elf/genrtldtbl.awk b/elf/genrtldtbl.awk
index 50f81c8c34..f5656a2b44 100644
--- a/elf/genrtldtbl.awk
+++ b/elf/genrtldtbl.awk
@@ -5,7 +5,8 @@ BEGIN {
}
{
for (i = 1; i <= NF; ++i) {
- dir[count++] = gensub(/((.*)[^/])?[/]*/, "\\1", "", $i);
+ gsub (/\/*$/, "", $i);
+ dir[count++] = $i;
}
}
END {