Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!texsun!convex!concave.convex.com!bobm From: bobm@concave.convex.com (Bob Miller) Newsgroups: gnu.utils.bug Subject: bug in binutils ld (and fix!) Keywords: ld, fix Message-ID: <100231@convex.convex.com> Date: 24 Feb 90 00:43:47 GMT Sender: news@convex.com Reply-To: bobm@concave.convex.com (Bob Miller) Organization: Convex Computer Corporation, Richardson, Texas Lines: 34 When ld scans an archive that has no __.SYMDEFS, it loses track of all members other than the last. Then it prints this fascinating message. internal error: wrong number of symbols written into output file The problem is in process_subentry. It isn't putting archive members onto the subentry chain right, so they aren't found on subsequent passes. Here's a fix. I'm using ld.c from the binutils product. The date on ld.c is October 17, 1989. *************** *** 2277,2283 **** prev->chain = subentry; else entry->subfiles = subentry; ! prev = subentry; subentry->strings = 0; /* Since space will dissapear on return */ } } --- 2294,2300 ---- prev->chain = subentry; else entry->subfiles = subentry; ! *prev_addr = subentry; subentry->strings = 0; /* Since space will dissapear on return */ } } K "Computers are my forte." Bob Miller/bobm@convex.com