about summary refs log tree commit diff
path: root/soft-fp/op-4.h
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2018-03-18 17:12:42 -0400
committerZack Weinberg <zackw@panix.com>2018-03-26 08:27:47 -0400
commit65a7c4c9272f1b14a2b87733bf4dbb564c3dd1d2 (patch)
tree4071e1a9510db7601199bd81d045374a94ab044c /soft-fp/op-4.h
parent3dfd23eb4bdc7707048b115548e2238dacef064e (diff)
downloadglibc-65a7c4c9272f1b14a2b87733bf4dbb564c3dd1d2.tar.gz
glibc-65a7c4c9272f1b14a2b87733bf4dbb564c3dd1d2.tar.xz
glibc-65a7c4c9272f1b14a2b87733bf4dbb564c3dd1d2.zip
RFC: Introduce pt-compat-stubs and use it to replace pt-vfork.
I am looking into the possibility of eliminating all of the duplicate
function definitions from libpthread, replacing them with
properly-tagged weak compatibility symbols that just call the
definition in libc.  Because one of the duplicated functions is vfork,
the calls to libc absolutely must reuse the stack frame (a "sibcall"
in GCC internals jargon), and on several important targets, GCC does
not implement sibcalls, or only implements them for intra-module
calls.  But we only need to implement a single special case,
sibcalling a function with exactly the same signature, from
immediately after the caller's own entry point; so doing it by hand in
assembly language is not a crazy notion.  I believe I have managed to
turn the trick for all currently-supported targets.  This patch just
converts the existing vfork stub, so that review can focus on the new
sysdep.h SIBCALL macros.

	* sysdeps/generic/pt-compat-stubs.S: New file.
	* nptl/Makefile (libpthread-routines): Remove pt-vfork, add
	pt-compat-stubs.
	(libpthread-shared-only-routines): Add pt-compat-stubs.
	* posix/vfork.c: Define __libc_vfork as well as __vfork and vfork.

	* sysdeps/generic/sysdep.h (SIBCALL): New macro to perform
	sibling calls; the generic definition errors out if used.
	* sysdeps/aarch64/sysdep.h, sysdeps/arm/sysdep.h
	* sysdeps/hppa/sysdep.h, sysdeps/ia64/sysdep.h
	* sysdeps/m68k/sysdep.h, sysdeps/microblaze/sysdep.h
	* sysdeps/nios2/sysdep.h, sysdeps/powerpc/powerpc32/sysdep.h
	* sysdeps/powerpc/powerpc64/sysdep.h, sysdeps/s390/s390-32/sysdep.h
	* sysdeps/s390/s390-64/sysdep.h, sysdeps/tile/sysdep.h
	* sysdeps/unix/alpha/sysdep.h, sysdeps/unix/mips/mips32/sysdep.h
	* sysdeps/unix/mips/mips64/n32/sysdep.h
	* sysdeps/unix/mips/mips64/n64/sysdep.h
	* sysdeps/unix/sysv/linux/riscv/sysdep.h
	* sysdeps/x86/sysdep.h
	Provide appropriate architecture-specific definitions of
	SIBCALL and, if necessary, SIBCALL_ENTRY.

	* nptl/pt-vfork.c
	* sysdeps/unix/sysv/linux/aarch64/pt-vfork.c
	* sysdeps/unix/sysv/linux/m68k/pt-vfork.c
	* sysdeps/unix/sysv/linux/tile/pt-vfork.c
	* sysdeps/unix/sysv/linux/alpha/pt-vfork.S
	* sysdeps/unix/sysv/linux/hppa/pt-vfork.S
	* sysdeps/unix/sysv/linux/ia64/pt-vfork.S
	* sysdeps/unix/sysv/linux/microblaze/pt-vfork.S
	* sysdeps/unix/sysv/linux/mips/pt-vfork.S
	* sysdeps/unix/sysv/linux/riscv/pt-vfork.S
	* sysdeps/unix/sysv/linux/s390/pt-vfork.S
	* sysdeps/unix/sysv/linux/sh/pt-vfork.S
	* sysdeps/unix/sysv/linux/sparc/pt-vfork.S
	Remove file.
Diffstat (limited to 'soft-fp/op-4.h')
0 files changed, 0 insertions, 0 deletions