summaryrefslogtreecommitdiff
path: root/bfd/cofflink.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2006-07-05 10:21:39 +0000
committerNick Clifton <nickc@redhat.com>2006-07-05 10:21:39 +0000
commit43f9b2de73b0e9ed55d70a3ba38ce14905dbe8c6 (patch)
treea3bc586fc8892117d8d25fa5244b7916bf505a23 /bfd/cofflink.c
parent0fdd85c2cec83aaae4e2a207d7be66be7cbb6414 (diff)
downloadgdb-43f9b2de73b0e9ed55d70a3ba38ce14905dbe8c6.tar.gz
PR ld/2659
* cofflink.c (_bfd_coff_link_input_bfd): Fix selection of aux entry when multiple definitions of a symbol are encountered.
Diffstat (limited to 'bfd/cofflink.c')
-rw-r--r--bfd/cofflink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index c17701c16e8..40f5a700929 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -1921,6 +1921,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *finfo, bfd *input_bfd)
generate two symbols with the same name, but only one
will have aux entries. */
BFD_ASSERT (isymp->n_numaux == 0
+ || h->numaux == 0
|| h->numaux == isymp->n_numaux);
}
@@ -1936,7 +1937,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *finfo, bfd *input_bfd)
union internal_auxent aux;
union internal_auxent *auxp;
- if (h != NULL)
+ if (h != NULL && h->aux != NULL && (h->numaux > i))
auxp = h->aux + i;
else
{