Your elf-bfd.h and elflink.c changes caused ld regressions for cris-axis-elf (likely others)

H. J. Lu hjl@lucon.org
Sat Mar 19 01:05:00 GMT 2005


On Sat, Mar 19, 2005 at 10:06:59AM +1030, Alan Modra wrote:
> > --- bfd/elflink.c.zero	2005-03-18 06:23:37.000000000 -0800
> > +++ bfd/elflink.c	2005-03-18 06:55:10.322391518 -0800
> > @@ -9012,7 +9012,9 @@ elf_mark_used_section (struct elf_link_h
> >        || h->root.type == bfd_link_hash_defweak)
> >      {
> >        asection *s = h->root.u.def.section;
> > -      if (s != NULL && s->output_section != NULL && s->output_section != s)
> > +      if (s != NULL
> > +	  && s->output_section != NULL
> > +	  && !bfd_is_const_section (s->output_section))
> >  	s->output_section->flags |= SEC_KEEP;
> >      }
> 
> You may as well leave off the !bfd_is_const_section test, or revert to
> as you had it.  At one stage bdf_abs_section was const, so attempting to
> change flags would cause segfaults.  I overreacted to think it incorrect
> to twiddle bfd_abs_section.  It doesn't really matter to just set
> SEC_KEEP.
> 

I reverted it to the old version.


H.J.



More information about the Binutils mailing list