[PATCH] Respect symbol wrappers when computing symbol resolutions.
authorDave Korn <dave.korn@artimi.com>
Thu, 10 Mar 2011 10:27:50 +0000 (10:27 +0000)
committerDave Korn <dave.korn@artimi.com>
Thu, 10 Mar 2011 10:27:50 +0000 (10:27 +0000)
ld/ChangeLog:

2011-03-10  Dave Korn  <dave.korn.cygwin@gmail.com>

* plugin.c (get_symbols): Use wrapped lookup for undefined symbols.

ld/ChangeLog
ld/plugin.c

index 8283becc8dc25e0abd348ac97cd2a0a666c76474..cdc9198d8e6bc81bfba647a51e917ef0c86552ab 100644 (file)
@@ -1,3 +1,7 @@
+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.
index 2fd82910c5dd4346d312baea952e675aed385bcb..d4bbfe785201bd8459b66db8d1efa2fcbcf4d53d 100644 (file)
@@ -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;