LTO Optimization with asm renames of intrinsic functions
Thu Aug 13 03:17:47 GMT 2020
On Wed, 2020-08-12 at 17:26 -0500, Paul E Murphy via Gcc-help wrote:
> I ran into a slight divergence of behavior when enabling LTO using GCC
> 10.2 or newer when building libdfp on x86 and ppc64.
> Libdfp builds a copy of libdecnumber which exports its own copy of ABI
> as specified for _Decimal types in the GCC documentation. Some of this
> ABI is implicitly used in libdfp to implement various facilities.
> These intrinsic calls generate PLT calls which should resolve to
> symbols provided by libdfp. However, libdfp tries to avoid these
> by inserting asm renames of the form:
> asm ("__bid_floatsidd = __GI___bid_floatsidd");
If you've got an ASM like this, then you can't use LTO. In simplest terms LTO
doesn't look inside ASMs for symbol references and can't inherently do the right
You might be able to use the symver attribute to do renaming, but I don't know if
anyone's tried it yet for anything other than specifying symbol versioning.
More information about the Gcc-help