aboutsummaryrefslogtreecommitdiff
path: root/bfd/xcofflink.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-10-27 00:10:05 +0000
committerIan Lance Taylor <ian@airs.com>1995-10-27 00:10:05 +0000
commit1d04caa1f9630dd6d04fc4fa8c1f42826f269f08 (patch)
treef5ce3c7e4d25672492a08b38053785db7f3b8f70 /bfd/xcofflink.c
parent811f1bdce68c1ac53f95f0cf3ffe23b0ff703eaa (diff)
downloadgdb-1d04caa1f9630dd6d04fc4fa8c1f42826f269f08.zip
gdb-1d04caa1f9630dd6d04fc4fa8c1f42826f269f08.tar.gz
gdb-1d04caa1f9630dd6d04fc4fa8c1f42826f269f08.tar.bz2
fix output location of common symbols
Diffstat (limited to 'bfd/xcofflink.c')
-rw-r--r--bfd/xcofflink.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c
index dda5cd8..8dedde0 100644
--- a/bfd/xcofflink.c
+++ b/bfd/xcofflink.c
@@ -3499,7 +3499,10 @@ xcoff_link_input_bfd (finfo, input_bfd)
if (! skip
&& isym.n_sclass == C_EXT
&& smtyp == XTY_CM
- && (*sym_hash)->root.type != bfd_link_hash_common)
+ && ((*sym_hash)->root.type != bfd_link_hash_common
+ || (*sym_hash)->root.u.c.p->section != *csectpp)
+ && ((*sym_hash)->root.type != bfd_link_hash_defined
+ || (*sym_hash)->root.u.def.section != *csectpp))
skip = true;
/* Skip local symbols if we are discarding them. */