diff options
author | Cary Coutant <ccoutant@gmail.com> | 2016-03-30 19:14:16 -0700 |
---|---|---|
committer | Cary Coutant <ccoutant@gmail.com> | 2016-03-30 19:15:09 -0700 |
commit | b60ecbc6ddeaf7af8f2515841b58035f0d4d2db7 (patch) | |
tree | dc11852556634324f1d13a65136240fdeb78411a /zlib/adler32.c | |
parent | 69b51e106dcfadd783257feac067fe79c66570b0 (diff) | |
download | gdb-b60ecbc6ddeaf7af8f2515841b58035f0d4d2db7.zip gdb-b60ecbc6ddeaf7af8f2515841b58035f0d4d2db7.tar.gz gdb-b60ecbc6ddeaf7af8f2515841b58035f0d4d2db7.tar.bz2 |
Don't override definition a shared object by one in a later shared object.
In PR 16979, a reference to malloc is being resolved to an unversioned
reference in libmalloc.so. When linked with --as-needed, however, the
dynamic table does not list libmalloc.so as a DT_NEEDED library.
If we have a reference to an unversioned symbol in a shared object,
and we later see a versioned definition in another shared object, we
were overriding the first definition with the second in the process of
defining the default version. As a result, we no longer think that the
first shared object was actually needed to resolve any symbols, and we
don't list it as a DT_NEEDED library.
This patch fixes the problem by treating the two definitions as separate
symbols, so the second definition does not override the first.
2016-03-30 Cary Coutant <ccoutant@gmail.com>
gold/
PR gold/16979
* symtab.cc (Symbol_table::define_default_version): Check for case
where symbols are both in different shared objects.
Diffstat (limited to 'zlib/adler32.c')
0 files changed, 0 insertions, 0 deletions