[PowerPC64] Use medium model toc accesses throughout

Alan Modra amodra@gmail.com
Sat Jan 29 01:24:12 GMT 2022


On Fri, Jan 28, 2022 at 11:48:44AM -0600, Paul E Murphy wrote:
> > --- a/sysdeps/powerpc/powerpc64/dl-trampoline.S
> > +++ b/sysdeps/powerpc/powerpc64/dl-trampoline.S
> > @@ -32,6 +32,7 @@
> >      because gcc as of 2010/05 doesn't allocate a proper stack frame for
> >      a function that makes no calls except for __tls_get_addr and we
> >      might be here resolving the __tls_get_addr call.  */
> > +	.hidden _dl_runtime_resolve
> >   #define INT_PARMS FRAME_MIN_SIZE
> >   ENTRY (_dl_runtime_resolve, 4)
> >   	stdu	r1,-FRAME_SIZE(r1)
> > @@ -195,6 +196,7 @@ END(_dl_runtime_resolve)
> >      parm1 (r3) and the index (r0) needs to be converted to an offset
> >      (index * 24) in parm2 (r4).  */
> >   #ifndef PROF
> > +	.hidden _dl_profile_resolve
> >   ENTRY (_dl_profile_resolve, 4)
> >   /* Spill r30, r31 to preserve the link_map* and reloc_addr, in case we
> >      need to call _dl_audit_pltexit.  */
> 
> LGTM (this should wait until after the freeze), though these two changes
> seem orthogonal to the commit title.

True.  It could have been a separate patch.

> For my education, why are are small model accesses used in these files?

dl-trampoline.S is an old file, from before the linker edited
toc-indirect code to toc-pointer relative.  Without the link editing
small model is more efficient if the toc is small enough.

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Libc-alpha mailing list