From 7d9d82196194cb4edde3a28ba5da1c950e7c9ae7 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sun, 9 Jun 2002 03:08:54 +0000 Subject: [PATCH] 2002-06-08 H.J. Lu * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to work around a long long bug in gcc 2.96 on mips. --- bfd/ChangeLog | 5 +++++ bfd/elf.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index e9fd3f2fd4..d7b6138217 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2002-06-08 H.J. Lu + + * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to + work around a long long bug in gcc 2.96 on mips. + 2002-06-08 Jason Thorpe * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo. diff --git a/bfd/elf.c b/bfd/elf.c index dd1b0673e4..61b9f50b06 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -4688,7 +4688,9 @@ copy_private_bfd_data (ibfd, obfd) pointers that we are interested in. As these sections get assigned to a segment, they are removed from this array. */ - amt = (bfd_size_type) section_count * sizeof (asection *); + /* Gcc 2.96 miscompiles this code on mips. Don't do casting here + to work around this long long bug. */ + amt = section_count * sizeof (asection *); sections = (asection **) bfd_malloc (amt); if (sections == NULL) return false; -- 2.11.0