This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

crashing problem with ld and -O1



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---


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]