diff options
author | Dave Korn <dave.korn@artimi.com> | 2011-03-10 10:27:50 +0000 |
---|---|---|
committer | Dave Korn <dave.korn@artimi.com> | 2011-03-10 10:27:50 +0000 |
commit | 10be1b6abecee852928787c0f92356ec3eb38dce (patch) | |
tree | bba80cd733ded33934584bec4e2637063fb25dcc | |
parent | 422b6f14400e65d70cf20cde6140bd563cf493ee (diff) | |
download | gdb-10be1b6abecee852928787c0f92356ec3eb38dce.zip gdb-10be1b6abecee852928787c0f92356ec3eb38dce.tar.gz gdb-10be1b6abecee852928787c0f92356ec3eb38dce.tar.bz2 |
[PATCH] Respect symbol wrappers when computing symbol resolutions.
ld/ChangeLog:
2011-03-10 Dave Korn <dave.korn.cygwin@gmail.com>
* plugin.c (get_symbols): Use wrapped lookup for undefined symbols.
-rw-r--r-- | ld/ChangeLog | 4 | ||||
-rw-r--r-- | ld/plugin.c | 9 |
2 files changed, 10 insertions, 3 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 8283bec..cdc9198 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,9 @@ 2011-03-10 Dave Korn <dave.korn.cygwin@gmail.com> + * plugin.c (get_symbols): Use wrapped lookup for undefined symbols. + +2011-03-10 Dave Korn <dave.korn.cygwin@gmail.com> + * ldlang.c (lang_check): Don't run checks on dummy IR BFDs. 2011-03-10 Dave Korn <dave.korn.cygwin@gmail.com> diff --git a/ld/plugin.c b/ld/plugin.c index 2fd8291..d4bbfe78 100644 --- a/ld/plugin.c +++ b/ld/plugin.c @@ -456,9 +456,12 @@ get_symbols (const void *handle, int nsyms, struct ld_plugin_symbol *syms) struct bfd_link_hash_entry *blhe; bfd_boolean ironly; asection *owner_sec; - - blhe = bfd_link_hash_lookup (link_info.hash, syms[n].name, - FALSE, FALSE, TRUE); + if (syms[n].def != LDPK_UNDEF) + blhe = bfd_link_hash_lookup (link_info.hash, syms[n].name, + FALSE, FALSE, TRUE); + else + blhe = bfd_wrapped_link_hash_lookup (link_info.output_bfd, &link_info, + syms[n].name, FALSE, FALSE, TRUE); if (!blhe) { syms[n].resolution = LDPR_UNKNOWN; |