binutils dhd

Alan Modra alan@linuxcare.com.au
Wed, 27 Sep 2000 11:44:23 +1100 (EST)


On Wed, 27 Sep 2000, Alan Modra wrote:

> On Tue, 26 Sep 2000, David Huggins-Daines wrote:
> 
> > Sometimes we get the "split field selectors" problem in import stubs
> > if the distance between the GP and the PLT is not a multiple of 8
> > bytes.  Use alignment constraints on .plt, .got, and .data to fix
> > this.
> 
> Ouch.  But aligning doesn't fix the problem (well, it may in a particular
> case).  The reason aligning won't always work is that import and long
> branch stubs are interspersed in the stub section, and PIC long branch
> stubs happen to be 12 bytes long.  Which messes with your carefully
> constructed 8 byte alignment.

No, that's wrong.  Aligning the .plt and gp _will_ fix the problem, but
using lrsel/rrsel is still the better solution.

> The proper fix is to use lr_sel and rr_sel when building the import stubs,
> so I'm reverting your change unless you have some other reason for wanting
> 8 byte alignment.
> 
> Alan

-- 
Linuxcare.  Support for the Revolution.