piet@cs.ruu.nl (Piet van Oostrum) (07/12/89)
I found why GNU ``ar'' doesn't work properly when replacing members. It
just didn't delete the old members from __SYMDEF.
Patch: (I tested this on an older version of ar, I have no reason to
believe that it shouldn't work in the current version)
*** ar.c.orig Mon Mar 6 00:53:47 1989
--- ar.c Wed Jul 12 15:51:06 1989
***************
*** 788,794 ****
{
if (symdef_exists)
{
! #if 0
/* This is turned off because there seems to be a bug
in deleting the symdefs for members that are deleted.
The easiest way to fix it
--- 788,794 ----
{
if (symdef_exists)
{
! #if 1 /* This should work now -- PvO -- 6 July 1989 */
/* This is turned off because there seems to be a bug
in deleting the symdefs for members that are deleted.
The easiest way to fix it
***************
*** 1354,1359 ****
--- 1354,1361 ----
char *strings;
int i;
int offset;
+
+ if (! name) return; /* deleted member */
if (mapelt->info.data_offset)
{
--
Piet van Oostrum, Dept of Computer Science, University of Utrecht
Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands
Telephone: +31-30-531806. piet@cs.ruu.nl (mcvax!hp4nl!ruuinf!piet)