diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-06-08 03:03:00 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-06-08 03:03:00 +0000 |
commit | dec126b41a0bf2d807c3fc908bd8a0f1a9fa9277 (patch) | |
tree | d61bbc6512ab4f496d69ed494f1344704cb215ec /elf/do-lookup.h | |
parent | b8565e7817d7c6afd8eac804867b88c9bad1c9f1 (diff) | |
download | glibc-dec126b41a0bf2d807c3fc908bd8a0f1a9fa9277.zip glibc-dec126b41a0bf2d807c3fc908bd8a0f1a9fa9277.tar.gz glibc-dec126b41a0bf2d807c3fc908bd8a0f1a9fa9277.tar.bz2 |
Update.
* dlfcn/dlfcn.h: Pretty print dladdr declaraction.
* elf/rtld.c (process_envvars): Recognize LD_DYNAMIC_WEAK.
(_dl_dynamic_weak): New variable.
* elf/dl-support.c: Likewise.
* sysdeps/generic/ldsodefs.h: Declare _dl_dynamic_weak.
* elf/do-lookup.h: If we find a weak definition treat it like a
normal symbol unless _dl_dynamic_weak is nonzero. In the latter
case treat it like before.
Diffstat (limited to 'elf/do-lookup.h')
-rw-r--r-- | elf/do-lookup.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/elf/do-lookup.h b/elf/do-lookup.h index 873e953..ffc98ab 100644 --- a/elf/do-lookup.h +++ b/elf/do-lookup.h @@ -157,19 +157,23 @@ FCT (const char *undef_name, struct link_map *undef_map, found_it: switch (ELFW(ST_BIND) (sym->st_info)) { + case STB_WEAK: + /* Weak definition. Use this value if we don't find another. */ + if (__builtin_expect (_dl_dynamic_weak, 0)) + { + if (! result->s) + { + result->s = sym; + result->m = map; + } + break; + } + /* FALLTHROUGH */ case STB_GLOBAL: /* Global definition. Just what we need. */ result->s = sym; result->m = map; return 1; - case STB_WEAK: - /* Weak definition. Use this value if we don't find another. */ - if (! result->s) - { - result->s = sym; - result->m = map; - } - break; default: /* Local symbols are ignored. */ break; |