This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GOT refcounting broke non-refcount targets


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


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