aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorDave Korn <dave.korn@artimi.com>2010-10-20 17:01:06 +0000
committerDave Korn <dave.korn@artimi.com>2010-10-20 17:01:06 +0000
commit7bac81d3f66eada6de9624ae5c75d6aa180495cd (patch)
treeca33164e1e14c8e2cee3c9b133be35c7ecdaac45 /ld
parent18a8530e50d991c60e4eaa183daebc95213a3fb7 (diff)
downloadgdb-7bac81d3f66eada6de9624ae5c75d6aa180495cd.zip
gdb-7bac81d3f66eada6de9624ae5c75d6aa180495cd.tar.gz
gdb-7bac81d3f66eada6de9624ae5c75d6aa180495cd.tar.bz2
* plugin.c (get_symbols): Check symbol type correctly.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog4
-rw-r--r--ld/plugin.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index e0a3e61..7ac8782 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -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>
diff --git a/ld/plugin.c b/ld/plugin.c
index c1961c5..efc520f 100644
--- a/ld/plugin.c
+++ b/ld/plugin.c
@@ -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)