glibc/sysdeps/powerpc/powerpc32
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
..
405 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
440 Move powerpc ports pieces to libc. 2013-10-04 16:02:33 +00:00
464 Move powerpc ports pieces to libc. 2013-10-04 16:02:33 +00:00
476 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
970
a2 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
bits Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
cell Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
e500/nofpu Fix libm feupdateenv namespace (bug 17748). 2015-01-07 19:01:20 +00:00
fpu Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
power4 Use libc_hidden_proto / libc_hidden_def with __strnlen. 2015-06-02 20:24:25 +00:00
power5 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
power5+ 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
power6x Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
power7 Use libc_hidden_proto / libc_hidden_def with __strnlen. 2015-06-02 20:24:25 +00:00
power8 PowerPC: Adjust multiarch Implies for PowerPC32 2013-12-06 05:47:05 -06:00
Implies
Makefile Move powerpc ports pieces to libc. 2013-10-04 16:02:33 +00:00
Versions
__longjmp-common.S 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
add_n.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
addmul_1.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
backtrace.c libc-vdso.h place consolidation 2015-04-20 08:51:17 -03:00
bsd-_setjmp.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
bsd-setjmp.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
bzero.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
compat-ppc-mcount.S
configure powerpc: drop R_PPC_REL16 check 2015-02-10 06:09:22 -05:00
configure.ac powerpc: drop R_PPC_REL16 check 2015-02-10 06:09:22 -05: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-dtprocnum.h
dl-irel.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-machine.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-machine.h powerpc __tls_get_addr call optimization 2015-03-25 15:53:47 +10:30
dl-start.S 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
gprrest0.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
gprrest1.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
gprsave0.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
gprsave1.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
libgcc-compat.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
lshift.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
mcount.c PowerPC ugly symbol versioning 2013-10-04 10:38:28 +09:30
memset.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
mul_1.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
ppc-mcount.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
register-dump.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
rshift.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
rtld-memset.c
setjmp-common.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
setjmp.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
stackguard-macros.h BZ #15754: CVE-2013-4788 2013-09-23 00:52:09 -04:00
start.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
stpcpy.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strchr.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strcmp.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strcpy.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strlen.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strncmp.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
sub_n.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
submul_1.S 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
tls-macros.h Remove HAVE_ASM_PPC_REL16 references 2015-03-23 15:33:59 +10:30
tst-audit.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00