* plugin.c (get_symbols): Check symbol type correctly.
authorDave Korn <dave.korn@artimi.com>
Wed, 20 Oct 2010 17:01:06 +0000 (17:01 +0000)
committerDave Korn <dave.korn@artimi.com>
Wed, 20 Oct 2010 17:01:06 +0000 (17:01 +0000)
ld/ChangeLog
ld/plugin.c

index e0a3e6106a3e28a0a5598d59990102fb6236ce91..7ac8782598ef55275f1769d1c7951689cdad7ef3 100644 (file)
@@ -1,3 +1,7 @@
+2010-10-20  Dave Korn  <dave.korn.cygwin@gmail.com>
+
+       * plugin.c (get_symbols): Check symbol type correctly.
+
 2010-10-15  Dave Korn  <dave.korn.cygwin@gmail.com>
 
        * configure.in: If <dlfcn.h> can't be found, try for <Windows.h>
index c1961c54f4fb9a8ddd8e1bf755a34cfab2e65226..efc520f7077ebb75b7ae8ce010f9cd188d3ee240 100644 (file)
@@ -417,7 +417,7 @@ get_symbols (const void *handle, int nsyms, struct ld_plugin_symbol *syms)
       if (syms[n].def == LDPK_UNDEF || syms[n].def == LDPK_WEAKUNDEF
          || syms[n].def == LDPK_COMMON)
        {
-         asection *owner_sec = (syms[n].def == LDPK_COMMON)
+         asection *owner_sec = (blhe->type == bfd_link_hash_common)
                                ? blhe->u.c.p->section
                                : blhe->u.def.section;
          if (owner_sec->owner == link_info.output_bfd)