GOT refcounting broke non-refcount targets

Alan Modra amodra@bigpond.net.au
Wed Aug 21 16:49:00 GMT 2002


On Wed, Aug 21, 2002 at 07:14:26PM -0400, Daniel Jacobowitz wrote:
> On Thu, Aug 22, 2002 at 08:31:03AM +0930, Alan Modra wrote:
> > Rip the code out.  elf32_sparc_gc_sweep_hook is bogus.  It should
> > just return true.
> 
> Rip out the whole function, I think you mean?

Yes.

> Aha, I missed can_refcount (Should elf32-vax be setting that?  It looks
> like it ought to, since it tries real hard to do the refcount
> handling...).

Not without changing some other code, as it expects zero references to
have a -1 count.  eg.

	      if (h->got.refcount == -1)
		{
		  h->got.refcount = 1;
[snip]
		}
	      else
		{
		  h->got.refcount++;
[snip]

Which was the whole point of the can_refcount patch.

> I like your suggestion.  One less bit of magic.  Mind doing the
> gruntwork (since you offered :)?

OK.

> Oh, Alan, if you see a way to write a testcase for this...

Yikes.  If I find some free time.  Heh.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list