This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: Weak functions on powerpc64-linux


On Wed, Feb 27, 2002 at 10:52:14AM -0800, Richard Henderson wrote:
> On Thu, Feb 28, 2002 at 01:47:30AM +1030, Alan Modra wrote:
> > +  for (t = *(struct weak_syms **) arg; t != NULL; t = t->next)
> > +    {
> > +      tree decl = t->decl;
> > +      if (decl == NULL_TREE)
> > +	{
> > +	  tree name = get_identifier (t->name);
> > +	  if (name)
> > +	    decl = lookup_name (name);
> > +	  t->decl = decl;
> > +	}
> > +      ggc_mark_tree (decl);
> 
> No, this need be no more complicated than
> 
> 	for (...)
> 	  ggc_mark_tree (t->decl);
> 
> I.e. mark exactly what's in your data structure.

What I'm covering here is

#pragma weak foo
int foo (void)

In this case the decl doesn't get put on the weak_decl list as it's
not around when we hit #pragma weak.  Yet I want the decl to be there
for finish_weaks.

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