[PATCH] Not append rela for abs_symbol

Xi Ruoyao xry111@xry111.site
Thu Aug 15 08:52:55 GMT 2024


On Thu, 2024-08-15 at 15:15 +0800, ywgrit wrote:
> > >    	  if (local_got && 0 == info->relax_pass
> > > +	      // We can not change the r_type which will be
> > > +	      // needed when relocate for absolute symbol.
> > AFAIK BFD code base prefer /* ... */ over //.
> > 
> > Technically we can relax pcalau12i + ld.d to lu12i.w + ori if the
> > absolute symbol is in [-2^31, 2^31), and then r_type can be changed to
> > R_LARCH_ABS_{HI20,LO12}.  It's OK not to implement this in the patch,
> > but the comment should say "not implemented yet" instead of "cannot."
> 
> Yeah, you are right. I didn't realize there is a possibility of applying 
> relax here for absolute symbol, Do you think I should implement relax 
> first before submitting new code?

Not needed, you can submit this first (just reword this comment) and
implement the relax later.

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University


More information about the Binutils mailing list