Patchwork Allow memset local PLT reference for powerpc soft-float

login
register
mail settings
Submitter Joseph Myers
Date June 10, 2019, 11:59 p.m.
Message ID <alpine.DEB.2.21.1906102358430.9787@digraph.polyomino.org.uk>
Download mbox | patch
Permalink /patch/33080/
State New
Headers show

Comments

Joseph Myers - June 10, 2019, 11:59 p.m.
Some recent change on GCC mainline resulted in the localplt test
failing for powerpc soft-float (not sure exactly when, as the failure
appeared when there were other build test failures as well;
<https://sourceware.org/ml/libc-testresults/2019-q2/msg00261.html>
shows it remaining when other failures went away).  The problem is a
call to memset that GCC now generates in the libgcc long double code.

Since memset is documented as a function GCC may always implicitly
generate calls to, it seems reasonable to allow that local PLT
reference (just like those for libgcc functions that GCC implicitly
generates calls to and that are also exported from libc.so), which
this patch does.

Tested for powerpc soft-float with build-many-glibcs.py.

2019-06-10  Joseph Myers  <joseph@codesourcery.com>

	* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data:
	Allow memset in libc.so.
Jonathan Nieder - June 11, 2019, 12:08 a.m.
Joseph Myers wrote:

> Some recent change on GCC mainline resulted in the localplt test
> failing for powerpc soft-float (not sure exactly when, as the failure
> appeared when there were other build test failures as well;
> <https://sourceware.org/ml/libc-testresults/2019-q2/msg00261.html>
> shows it remaining when other failures went away).  The problem is a
> call to memset that GCC now generates in the libgcc long double code.
>
> Since memset is documented as a function GCC may always implicitly
> generate calls to, it seems reasonable to allow that local PLT
> reference (just like those for libgcc functions that GCC implicitly
> generates calls to and that are also exported from libc.so), which
> this patch does.
>
> Tested for powerpc soft-float with build-many-glibcs.py.
>
> 2019-06-10  Joseph Myers  <joseph@codesourcery.com>
>
> 	* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data:
> 	Allow memset in libc.so.

Reviewed-by; Jonathan Nieder <jrnieder@gmail.com>
Thanks.

Patch

diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data
index fead931d4e..647e735fdf 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data
@@ -31,6 +31,7 @@  libc.so: calloc
 libc.so: free
 libc.so: malloc
 libc.so: memalign
+libc.so: memset ?
 libc.so: realloc
 libm.so: copysignl ?
 libm.so: fabsl