This is the mail archive of the
libc-alpha@cygnus.com
mailing list for the glibc project.
crashing problem with ld and -O1
- To: ian@cygnus.com
- Subject: crashing problem with ld and -O1
- From: Geoff Keating <geoffk@drongo.anu.edu.au>
- Date: Fri, 27 Nov 1998 18:17:52 +1100
- CC: libc-alpha@cygnus.com
The attached patch fixes a crashing problem that appears using ld with
-O1 on powerpc with the 981124 snapshot. The problem causes glibc 2.1
to fail to build.
--
Geoff Keating <Geoff.Keating@anu.edu.au>
---patch starts here---
Fri Nov 27 17:51:38 1998 Geoff Keating <geoffk@ozemail.com.au>
* elflink.h (compute_bucket_count): Don't allow minsize==0, it
causes division by zero later on.
--- gas-981124/bfd/elflink.h~ Tue Nov 24 20:12:51 1998
+++ gas-981124/bfd/elflink.h Fri Nov 27 17:48:32 1998
@@ -2259,6 +2259,7 @@
that the hashing table must at least have NSYMS/4 and at most
2*NSYMS buckets. */
minsize = nsyms / 4;
+ if (minsize == 0) minsize = 1;
best_size = maxsize = nsyms * 2;
/* Create array where we count the collisions in. We must use bfd_malloc
---patch ends here---