svn commit: r355045 - head/libexec/rtld-elf/powerpc

Brandon Bergren freebsd at bdragon.rtk0.net
Sun Nov 24 17:24:26 UTC 2019



On Sun, Nov 24, 2019, at 10:47 AM, Konstantin Belousov wrote:
> On Sun, Nov 24, 2019 at 10:32:23AM -0600, Brandon Bergren wrote:
> > On Sun, Nov 24, 2019, at 7:04 AM, Konstantin Belousov wrote:
> > > On Sun, Nov 24, 2019 at 04:35:29AM +0000, Justin Hibbits wrote:
> > > > Author: jhibbits
> > > > Date: Sun Nov 24 04:35:29 2019
> > > > New Revision: 355045
> > > > URL: https://svnweb.freebsd.org/changeset/base/355045
> > > > 
> > > > Log:
> > > >   rtld/powerpc: Fix _rtld_bind_start for powerpcspe
> > > >   
> > > >   Summary:
> > > >   We need to save off the full 64-bit register, not just the low 32 bits,
> > > >   of all registers getting saved off in _rtld_bind_start.  Additionally,
> > > >   we need to save off the other SPE registers (SPEFSCR and accumulator),
> > > >   so that their program state is not affected by the PLT resolver.
> > > Why do you need to save these registers ?  Why would rtld touch them ?
> > > 
> > Out of a need to make the binder as invisible as possible when interacting with code that may or may not be following the normal ABI rules regarding who is responsible for saving stuff.
> > 
> > It's not just C code using it.
> This was not the question.  If a register is saved at the bind entry, it
> means that it is used by rtld itself.  I am surprised that rtld needs
> anything from SPE.

You have a point there.

It's possible it's just the r0 damage (from using it to touch the 64-bit SPRs) combined with the alignment problem was throwing off the testing, and we don't actually have to save the high word of everything and that the negative results during all the testing was all from having either the r0 issue OR the alignment issue when doing the test.


More information about the svn-src-all mailing list