glibc/sysdeps/unix/sysv/linux/arm
Joseph Myers ea41469b7a Fix profil_counter namespace (bug 17725).
On ARM, where profil_counter is not static, it is brought in by
references to various standard functions, as noted in
<https://sourceware.org/ml/libc-alpha/2014-11/msg00890.html>, although
it is not a standard function itself.  I don't know if this also
causes test failures on SPARC, although I see no reason for it not to
do so.

This patch fixes this namespace issue.  profil_counter is renamed to
__profil_counter and made a weak alias on ARM and SPARC.  Because of
the uses in profil.c / sprofil.c it seems simplest to make the rename
globally, including on the other architectures for which
profil_counter was static and so the change is of no substance.  The
variant names profil_counter_* used in sprofil.c are also renamed to
start with __ so that undesired function names do not get exported in
static libc.

As I noted in bug 17726, profil_counter should probably be a compat
symbol on ARM and SPARC, so it wouldn't exist at all in static libc
even as a weak alias.  Since defining a compat symbol still requires
an internal name as a target of an alias, this patch still seems
reasonable as an intermediate step towards that goal: it wouldn't be
possible for the function simply to be static profil_counter on ARM
and SPARC with profil_counter also being the exported compat symbol
name, so profil.c / sprofil.c would still need to be prepared to call
the function under another name (here, __profil_counter).

Tested for x86_64 (testsuite, and that stripped installed shared
libraries are unchanged by the patch) and ARM (ABI and linknamespace
tests - this patch reduces the number of linknamespace failures I see
on ARM from 227 to 5, the residue being math.h failures for fe*
functions and for j0l/j1n/jnl/y0l/y1l/ynl aliases).

2014-12-17  Joseph Myers  <joseph@codesourcery.com>

	[BZ #17725]
	* sysdeps/generic/profil-counter.h (profil_counter): Rename to
	__profil_counter.
	* sysdeps/unix/sysv/linux/hppa/profil-counter.h (profil_counter):
	Likewise.
	* sysdeps/unix/sysv/linux/i386/profil-counter.h (profil_counter):
	Likewise.
	* sysdeps/unix/sysv/linux/ia64/profil-counter.h (profil_counter):
	Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/profil-counter.h
	(profil_counter): Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/profil-counter.h
	(profil_counter): Likewise.
	* sysdeps/unix/sysv/linux/sh/profil-counter.h (profil_counter):
	Likewise.
	* sysdeps/unix/sysv/linux/tile/profil-counter.h (profil_counter):
	Likewise.
	* sysdeps/unix/sysv/linux/x86_64/profil-counter.h
	(profil_counter): Likewise.
	* sysdeps/unix/sysv/linux/arm/profil-counter.h (profil_counter):
	Likewise.
	[!__profil_counter] (profil_counter): Define as weak alias of
	__profil_counter.
	* sysdeps/unix/sysv/linux/sparc/sparc32/profil-counter.h
	(profil_counter): Rename to __profil_counter.
	[!__profil_counter] (profil_counter): Define as weak alias of
	__profil_counter.
	* sysdeps/unix/sysv/linux/sparc/sparc64/profil-counter.h
	(profil_counter): Rename to __profil_counter.
	[!__profil_counter] (profil_counter): Define as weak alias of
	__profil_counter.
	* sysdeps/posix/profil.c: Update comment referring to
	profil_counter.
	(__profil): Use __profil_counter instead of profil_counter.
	* sysdeps/posix/sprofil.c (profil_counter): Rename to
	__profil_counter.  Use __profil_counter_ushort and
	__profil_counter_uint in definitions.
	(__sprofil): Use __profil_counter_uint and __profil_counter_ushort
	instead of profil_counter_uint and profil_counter_ushort.
2014-12-17 18:10:37 +00:00
..
bits ARM: Don't define _SYS_AUXV_H in sysdep.h 2014-09-23 14:58:49 +01:00
sys
____longjmp_chk.S
aeabi_read_tp.S
alphasort64.c
arch-fork.h ARM: Convert fork.c to arch-fork.h 2014-05-16 12:51:39 -07:00
arm-features.h
brk.c
c++-types.data Verbatim NPTL file moves for ARM/Linux. 2014-05-13 10:04:20 -07:00
clone.S Consolidate NPTL vs non clone.S for ARM. 2014-05-13 10:03:45 -07:00
dl-cache.h
dl-machine.h
dl-procinfo.c ARM: Add support for AT_HWCAP2 in _dl_procinfo 2014-06-25 16:02:04 +01:00
dl-procinfo.h ARM: Add support for AT_HWCAP2 in _dl_procinfo 2014-06-25 16:02:04 +01:00
fcntl.c
ftruncate64.c
fxstat.c
fxstatat.c
getcontext.S
getdents64.c
getrlimit64.c
glob64.c
Implies NPTL is no longer an add-on! 2014-07-07 09:29:06 -07:00
internal_accept4.S
internal_recvmmsg.S
internal_sendmmsg.S
ioperm.c
kernel-features.h arm: Re-enable PI futex support for ARM kernels >= 3.14.3 2014-10-27 22:45:43 +00:00
ld.abilist Verbatim NPTL file moves for ARM/Linux. 2014-05-13 10:04:20 -07:00
ldconfig.h
ldsodefs.h
libanl.abilist Verbatim NPTL file moves for ARM/Linux. 2014-05-13 10:04:20 -07:00
libBrokenLocale.abilist Verbatim NPTL file moves for ARM/Linux. 2014-05-13 10:04:20 -07:00
libc-do-syscall.S Fix sysdeps/unix/sysv/linux/arm/libc-do-syscall.S warning. 2014-11-26 15:13:27 +00:00
libc.abilist Verbatim NPTL file moves for ARM/Linux. 2014-05-13 10:04:20 -07:00
libcrypt.abilist Verbatim NPTL file moves for ARM/Linux. 2014-05-13 10:04:20 -07:00
libdl.abilist Verbatim NPTL file moves for ARM/Linux. 2014-05-13 10:04:20 -07:00
libm.abilist Verbatim NPTL file moves for ARM/Linux. 2014-05-13 10:04:20 -07:00
libnsl.abilist Verbatim NPTL file moves for ARM/Linux. 2014-05-13 10:04:20 -07:00
libpthread.abilist Verbatim NPTL file moves for ARM/Linux. 2014-05-13 10:04:20 -07:00
libresolv.abilist Verbatim NPTL file moves for ARM/Linux. 2014-05-13 10:04:20 -07:00
librt.abilist Verbatim NPTL file moves for ARM/Linux. 2014-05-13 10:04:20 -07:00
libthread_db.abilist Verbatim NPTL file moves for ARM/Linux. 2014-05-13 10:04:20 -07:00
libutil.abilist Verbatim NPTL file moves for ARM/Linux. 2014-05-13 10:04:20 -07:00
localplt.data Run check-localpltk/textrel/execstack over ld.so. 2014-11-06 15:48:44 -05:00
lockf64.c
lxstat.c Fix whitespace in ARM files to allow move. 2014-02-08 01:52:38 +00:00
makecontext.c
Makefile Clean up gnu/lib-names.h generation (bug 14171). 2014-09-26 17:33:04 +00:00
mmap64.S
mmap.S
msgctl.c
oldgetrlimit64.c
oldgetrlimit.c
oldsetrlimit.c
posix_fadvise64.c Clean up ARM old-ABI symbol versioning relics. 2014-05-14 00:41:20 +00:00
posix_fadvise.c
pread64.c
pread.c
profil-counter.h Fix profil_counter namespace (bug 17725). 2014-12-17 18:10:37 +00:00
pwrite64.c
pwrite.c
readahead.c
readdir64_r.c
readdir64.c
readelflib.c
register-dump.h
scandir64.c
semctl.c
setcontext.S
setegid.c
seteuid.c
setgid.c
setgroups.c
setregid.c
setresgid.c
setresuid.c
setreuid.c
setuid.c
shlib-versions Remove configuration name patterns from shlib-versions. 2014-09-12 12:28:47 +00:00
shmctl.c
sigaction.c Get rid of nptl/sysdeps/ entirely! 2014-07-07 09:28:38 -07:00
sigcontextinfo.h Remove stray includes of kernel-features.h. 2014-06-25 18:09:01 +00:00
sigrestorer.S Remove ARM __ASSUME_SIGFRAME_V2. 2014-06-21 00:58:56 +00:00
swapcontext.S
syscall.S
syscalls.list Move setfsgid/setfsuid definitions to syscalls.list (bug 14138). 2014-10-27 12:24:42 +00:00
sysdep-cancel.h Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
sysdep.h Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
sysdep.S
tls.h ARM: Split Linuxism out of sysdeps/arm/nptl/tls.h 2014-06-30 11:19:22 -07:00
truncate64.c
ucontext_i.sym
umount.c
unwind-forcedunwind.c Revert "Use pragmas rather than makefiles for necessary options for unwind code." 2014-12-16 15:46:00 -08:00
unwind-resume.c Fix ARM build with GCC trunk. 2014-05-20 21:27:13 +00:00
Versions Remove ARM __ASSUME_SIGFRAME_V2. 2014-06-21 00:58:56 +00:00
versionsort64.c
vfork.S ARM: Consolidate NPTL/non versions of vfork 2014-05-14 09:44:24 -07:00
xstat.c