glibc/sysdeps/powerpc
Joseph Myers 1769608794 Use libc_hidden_proto / libc_hidden_def with __strnlen.
Various code in glibc uses __strnlen instead of strnlen for namespace
reasons.  However, __strnlen does not use libc_hidden_proto /
libc_hidden_def (as is normally done for any function defined and
called within the same library, whether or not exported from the
library and whatever namespace it is in), so the compiler does not
know that those calls are to a function within libc.

This patch uses libc_hidden_proto / libc_hidden_def with __strnlen.
On x86_64, it makes no difference to the installed stripped shared
libraries.  On 32-bit x86, it causes __strnlen calls to go to the same
place as strnlen calls (the fallback strnlen implementation), rather
than through a PLT entry for the strnlen IFUNC; I'm not sure of the
logic behind when calls from within libc should use IFUNCs versus when
they should go direct to a particular function implementation, but
clearly it doesn't make sense for strnlen and __strnlen to be handled
differently in this regard.

Tested for x86_64 and x86 (testsuite, and comparison of installed
shared libraries as described above).

	* string/strnlen.c [!STRNLEN] (__strnlen): Use libc_hidden_def.
	* include/string.h (__strnlen): Use libc_hidden_proto.
	* sysdeps/aarch64/strnlen.S (__strnlen): Use libc_hidden_def.
	* sysdeps/i386/i686/multiarch/strnlen-c.c [SHARED]
	(libc_hidden_def): Define __GI___strnlen as well as __GI_strnlen.
	* sysdeps/powerpc/powerpc32/power4/multiarch/strnlen-power7.S
	(libc_hidden_def): Undefine and redefine.
	* sysdeps/powerpc/powerpc32/power4/multiarch/strnlen-ppc32.c
	[SHARED] (libc_hidden_def): Define __GI___strnlen as well as
	__GI_strnlen.
	* sysdeps/powerpc/powerpc32/power7/strnlen.S (__strnlen): Use
	libc_hidden_def.
	* sysdeps/tile/tilegx/strnlen.c (__strnlen): Likewise.
2015-06-02 20:24:25 +00:00
..
bits powerpc: Fix inline feraiseexcept, feclearexcept macros 2015-03-03 10:01:49 -05:00
fpu Update powerpc-fpu libm-test-ulps. 2015-05-29 09:42:55 -03:00
nofpu soft-fp: Define and use _FP_STATIC_ASSERT. 2015-03-12 18:43:21 +00:00
nptl powerpc: Fix Copyright dates and CL entry 2015-01-12 12:58:34 -05:00
power4 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
power5+/fpu Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
power6 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
power7/fpu Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
powerpc32 Use libc_hidden_proto / libc_hidden_def with __strnlen. 2015-06-02 20:24:25 +00:00
powerpc64 libc-vdso.h place consolidation 2015-04-20 08:51:17 -03:00
soft-fp soft-fp: support after-rounding tininess detection. 2014-02-12 18:27:12 +00:00
sys/platform Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
abort-instr.h Update. 2002-09-15 18:31:23 +00:00
dl-procinfo.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-procinfo.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-tls.c powerpc __tls_get_addr call optimization 2015-03-25 15:53:47 +10:30
dl-tls.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
ffs.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fpu_control.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
gccframe.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
ifunc-sel.h Move sysdeps/powerpc/elf files 2012-03-28 09:25:31 +02:00
Implies PowerPC: unify math_ldbl.h implementations 2013-03-08 11:07:15 -03:00
jmpbuf-offsets.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
ldsodefs.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
locale-defines.sym Optimized strcasecmp for Power7 2011-12-17 20:32:59 -05:00
longjmp.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
machine-gmon.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Makefile powerpc __tls_get_addr call optimization 2015-03-25 15:53:47 +10:30
math-tests.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
memusage.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
mp_clz_tab.c Update. 2002-03-14 20:48:50 +00:00
novmx-longjmp.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
novmx-sigjmp.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
novmxsetjmp.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
preconfigure Move base_machine and machine settings from configure.ac to sysdeps preconfigure fragments. 2014-06-25 17:52:56 +00:00
rtld-global-offsets.sym PowerPC: Define AT_HWCAP2 bits and AT_HWCAP2 handling for POWER8. 2013-06-28 16:52:49 -05:00
sched_cpucount.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
sigjmp.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
sotruss-lib.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
stackinfo.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strcat.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
sysdep.h powerpc: abort transaction in syscalls 2015-01-12 06:32:08 -05:00
test-arith.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
test-arithf.c Update. 1997-08-10 18:37:15 +00:00
test-gettimebase.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
tls-macros.h Split tls-macros.h in sysdeps directories. 2012-07-19 17:04:04 -03:00
tst-stack-align.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
tst-tlsopt-powerpc.c powerpc __tls_get_addr call optimization 2015-03-25 15:53:47 +10:30
Versions powerpc __tls_get_addr call optimization 2015-03-25 15:53:47 +10:30