aboutsummaryrefslogtreecommitdiff
path: root/bfd
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
commitcfc9dfb12363672b07c883a07a752e188d84a7b8 (patch)
tree4f53cbe0584605cf9e7d49c38e63fd2c1da01225 /bfd
parentf48c3cdcaa86190fcce7f303999b7db171a22015 (diff)
downloadgdb-cfc9dfb12363672b07c883a07a752e188d84a7b8.zip
gdb-cfc9dfb12363672b07c883a07a752e188d84a7b8.tar.gz
gdb-cfc9dfb12363672b07c883a07a752e188d84a7b8.tar.bz2
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')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/cofflink.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 760e5d4..55b1332 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2006-07-05 Nick Clifton <nickc@redhat.com>
+
+ PR ld/2659
+ * cofflink.c (_bfd_coff_link_input_bfd): Fix selection of aux
+ entry when multiple definitions of a symbol are encountered.
+
2006-06-30 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_relocate_section): Use xchg %ax,%ax
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index c17701c..40f5a70 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
{