Skip to content
Commit 31a9bc8c authored by Alan Modra's avatar Alan Modra
Browse files

powerpc64: Set up thread register for _dl_relocate_static_pie



libgcc ifunc resolvers that access hwcap via a field in the tcb can't
be called until the thread pointer is set up.  Other ifunc resolvers
might need access to at_platform.  This patch sets up a fake thread
pointer early to a copy of tcbhead_t.  hwcapinfo.c already had local
variables for hwcap and at_platform, replace them with an entire
tcbhead_t.  It's not that large and this way we easily ensure hwcap
and at_platform are at the same relative offsets as they are in the
real thread block.

The patch also conditionally disables part of tst-tlsifunc-static,
"bar address read from IFUNC resolver is incorrect".  We can't get a
proper address for a thread variable before glibc initialises tls.

Reviewed-by: default avatarTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
parent d6efcc11
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment