On 2021-05-12, Rainer Orth wrote:
Hi Fangrui,
Hi Rainer,
for -fPIE. Now that we have H.J. Lu's GOTPCRELX for years which mostly
nullify the benefit of HAVE_LD_PIE_COPYRELOC, HAVE_LD_PIE_COPYRELOC
should retire now.
Solaris/x86 ld doesn't support this, so HAVE_LD_PIE_COPYRELOC needs to
stay. The Solaris 11.3/x86 assembler doesn't support
R_X86_64_*GOTPCRELX.
Then I'll suggest that platforms which don't support GOTPCRELX just take
the very little performance hit (global variable access really should
not be in bottleneck of any properly written applications).
Avoiding copy relocations is *much* more important than saving few bytes
in global variable access.
If an app still wants faster variable access, use protected[1]/hidden.
[1]: protected data symbol has poor performance, which is the next thing
which should be fixed.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University