summaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-06-26 00:09:27 +0000
committerUlrich Drepper <drepper@redhat.com>1997-06-26 00:09:27 +0000
commitf9a73ae19a5fd2dff92b9eb631a96fff17b3f5af (patch)
treef93328864ea4994a3a08b73dbfe1c9ee4cb70dba /elf
parent478b92f03a640cba69e9508730abc00116c6940c (diff)
downloadglibc-f9a73ae19a5fd2dff92b9eb631a96fff17b3f5af.tar.gz
Update.
1997-06-26 02:06 Ulrich Drepper <drepper@cygnus.com> * Makerules ($(common-objpfx)libc.so): Use $(load-map-file) in dependency, not $(libc-map). * sysdeps/posix/mk-stdiolim.c: Pretty print. 1997-06-25 15:54 Fila Kolodny <fila@ibi.com> * sysdeps/posix/Makefile ($(common-objpfx)bits/stdio_lim.h): Don't conditionalize this on whether we are cross-compiling. 1997-06-21 15:47 H.J. Lu <hjl@gnu.ai.mit.edu> * elf/dl-lookup.c (do_lookup): Use default definition for a default versioned symbol. * elf/dl-version.c (_dl_check_map_versions): Set the hidden field. * elf/dlvsym.c (__dlvsym): Set the hidden field to 1. * elf/link.h (r_found_version): Add the hidden field. * math/test-matherr.c: New file. * math/Makefile (tests): Add test-matherr. (libm-support): Put back s_matherr. (static-only-routines, aux): Remove s_matherr.
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-lookup.c8
-rw-r--r--elf/dl-version.c1
-rw-r--r--elf/dlvsym.c1
-rw-r--r--elf/link.h1
4 files changed, 8 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;
}
diff --git a/elf/dl-version.c b/elf/dl-version.c
index f7df9805b3..d06fd5ce1e 100644
--- a/elf/dl-version.c
+++ b/elf/dl-version.c
@@ -274,6 +274,7 @@ _dl_check_map_versions (struct link_map *map, int verbose)
{
ElfW(Half) ndx = aux->vna_other & 0x7fff;
map->l_versions[ndx].hash = aux->vna_hash;
+ map->l_versions[ndx].hidden = aux->vna_other & 0x8000;
map->l_versions[ndx].name = &strtab[aux->vna_name];
map->l_versions[ndx].filename = &strtab[ent->vn_file];
diff --git a/elf/dlvsym.c b/elf/dlvsym.c
index ca8e25d9df..18cb892a3f 100644
--- a/elf/dlvsym.c
+++ b/elf/dlvsym.c
@@ -95,6 +95,7 @@ __dlvsym (void *handle, const char *name, const char *version_str)
/* Compute hash value to the version string. */
args.version.name = version_str;
+ args.version.hidden = 1;
args.version.hash = _dl_elf_hash (version_str);
/* We don't have a specific file where the symbol can be found. */
args.version.filename = NULL;
diff --git a/elf/link.h b/elf/link.h
index 6c272fe054..20e80b1466 100644
--- a/elf/link.h
+++ b/elf/link.h
@@ -87,6 +87,7 @@ struct r_found_version
const char *name;
ElfW(Word) hash;
+ int hidden;
const char *filename;
};