glibc/sysdeps/tile
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 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
nptl Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
tilegx Use libc_hidden_proto / libc_hidden_def with __strnlen. 2015-06-02 20:24:25 +00:00
tilepro Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
__longjmp.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
__tls_get_addr.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
_mcount.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
abort-instr.h
backtrace.c
bsd-_setjmp.S
bsd-setjmp.S
bzero.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
configure tile: Enable PI_STATIC_AND_HIDDEN 2015-04-16 09:40:21 -04:00
configure.ac tile: Enable PI_STATIC_AND_HIDDEN 2015-04-16 09:40:21 -04:00
crti.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
crtn.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-lookupcfg.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-machine.h Replace ELF_RTYPE_CLASS_NOCOPY with ELF_RTYPE_CLASS_COPY 2015-03-05 08:40:41 -08:00
dl-runtime.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-start.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-tls.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-tls.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-trampoline.S 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
ffsll.c 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
Implies
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
libm-test-ulps Don't include individual test ulps in libm-test-ulps. 2014-03-05 15:02:38 +00:00
machine-gmon.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Makefile
math_private.h Fix libm feupdateenv namespace (bug 17748). 2015-01-07 19:01:20 +00:00
memcmp.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
memcopy.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
preconfigure Remove relro configure test. 2014-06-27 16:51:22 +00:00
s_fma.c
s_fmaf.c
setjmp.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
sfp-machine.h 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
stackguard-macros.h
stackinfo.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
start.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
sysdep.h lround: provide cast for wordsize-64 version if needed 2015-01-05 11:59:32 -05:00
tls-macros.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
tst-audit.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Versions
wordcopy.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00