[PATCH] x86-64: Save and restore R10 in _dl_runtime_resolve [BZ #27279]
Florian Weimer
fweimer@redhat.com
Thu Feb 26 16:02:21 GMT 2026
* Jackson Stogel:
>> One concern that was raised is that Clang documents this functionality
>> as experimental. Maybe this can be fixed?
>
> I filed https://github.com/llvm/llvm-project/issues/178277 for
> documentation updates and will look for someone who can better comment
> on whether it should be moved out of its experimental status.
No takers yet apparently?
>> This functionality probably needs markup similar to
>> STO_AARCH64_VARIANT_PCS and STO_RISCV_VARIANT_CC for good developer
>> experience.
>
> The addition of an X86_64_VARIANT_CC attribute generally sounds like a
> good feature to me. In addition to providing better DevEx, would you
> want to start using such an attribute in the dynamic linker to
> conditionally handle functions? For example, similar to how AArch64
> avoids lazy PLT resolution for STO_AARCH64_VARIANT_PCS symbols [1].
> [1] https://sourceware.org/git/?p=glibc.git;a=commit;h=82bc69c012838a381c4167c156a06f4598f34227
I really dislike lazy binding and think that no one should be using it
anymore, but a couple of extra lines aren't so bad.
> Do you think saving/restoring R10 as in this patch is a good addition?
I'm worried that we'll need ABI tagging for this, otherwise software
can't really be sure that it's running on a glibc version that has the
fix, resulting in obscure issues. And ABI tagging is quite painful,
particular for non-RPM-based distributions. We didn't introduce ABI
tagging when we added support for the private Intel ABI, though, but
that was a different time.
Of course all of that is easily avoided by using BIND_NOW. 8-)
Maybe the linker could report an error when trying to link
against a X86_64_VARIANT_CC without -z now.
Thanks,
Florian
More information about the Libc-alpha
mailing list