From f9a73ae19a5fd2dff92b9eb631a96fff17b3f5af Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Jun 1997 00:09:27 +0000 Subject: Update. 1997-06-26 02:06 Ulrich Drepper * 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 * 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 * 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. --- elf/dl-lookup.c | 8 +++++--- elf/dl-version.c | 1 + elf/dlvsym.c | 1 + elf/link.h | 1 + 4 files changed, 8 insertions(+), 3 deletions(-) (limited to 'elf') diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c index 15da23d..4cc1f2d 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 f7df980..d06fd5c 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 ca8e25d..18cb892 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 6c272fe..20e80b1 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; }; -- cgit v1.1