[gnu.utils.bug] bug in binutils ld

bobm@concave.convex.com (Bob Miller) (02/24/90)

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

"Computers are my forte."		Bob Miller/bobm@convex.com