]> git.ipfire.org Git - thirdparty/glibc.git/commit
powerpc64le: enforce non-specific long double in .gnu.attributes section
authorPaul E. Murphy <murphyp@linux.vnet.ibm.com>
Fri, 6 Mar 2020 15:40:27 +0000 (09:40 -0600)
committerPaul E. Murphy <murphyp@linux.vnet.ibm.com>
Mon, 6 Apr 2020 15:23:58 +0000 (10:23 -0500)
commit4531ba8ebfedf97a31834201eaaf71c375793de2
tree2c00f1f5f04c107237740cc81e5fda049ee682dc
parent8e72163b16bfe874a415a558f78911e5d05c5f22
powerpc64le: enforce non-specific long double in .gnu.attributes section

We turn off this feature to avoid polluting our shared libary with
a specific value.  However, static libgcc is not under our control,
and has enabled this for ibm128 routines.  This pollutes the
resulting shared libraries with it.

Attach a post-linking hook to replace this section with one crafted
as hard-float + indeterminate ldbl.  This allows IEEE ldbl users to
avoid having to disable the gnu attributes feature which should
protect them from linking ibm ldbl libraries using the gnu attributes
feature.

Currently, this only replaces libc and libm which support both ldbl
formats and rely on application code to explicitly determine which
is to be used.

Strictly speaking, the section could be deleted with minimal lost value.
However correctly set attributes could prove useful for some future change,
and similarly missing attributes.

Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
sysdeps/powerpc/powerpc64/le/Makefile
sysdeps/powerpc/powerpc64/le/no_ldbl_gnu_attribute.c [new file with mode: 0644]