ucontext implementation featuring glibc-compatible ABI
 
 
 
 
Go to file
Khem Raj b6732f6884 Remove using .end directive with clang
Clang does not support this asm directive
Fixes Issue #19

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-04-10 11:23:39 -07:00
arch Remove using .end directive with clang 2020-04-10 11:23:39 -07:00
.gitignore remove pointless gitignore entries 2020-03-29 13:44:06 +00:00
.mailmap update copyright statements, add mailmap 2020-03-27 09:23:49 +00:00
LICENSE update copyright statements, add mailmap 2020-03-27 09:23:49 +00:00
Makefile Makefile: Add LIBDIR variable 2020-03-30 08:21:52 +00:00
NEWS README: ARCH=mips64 does support N32 ABI in theory 2020-03-30 06:38:23 +00:00
README.md Merge branch 'master' into master 2020-03-30 02:11:45 -06:00
test_libucontext.c test: swaps to f1 not main 2020-03-29 15:10:17 +00:00

README.md

libucontext

libucontext is a library which provides the ucontext.h C API. Unlike other implementations, it faithfully follows the kernel process ABI when doing context swaps.

Notably, when combined with gcompat, it provides a fully compatible implementation of the ucontext functions that are ABI compatible with glibc.

supported architectures

Adding support for new architectures is easy, but you need to know assembly language to do it.

Right now these archs are supported and should work on bare metal:

  • x86
  • x86_64
  • armv6+ (arm)
  • aarch64
  • s390x
  • mips (O32 ABI only)
  • mips64 (N32/N64 ABI only, like Alpine, only N64 ABI has been tested)

These archs require kernel assistance and use a syscall:

  • ppc
  • ppc64 (ELFv2 ABI spec only, ELFv1 not supported)

building

libucontext uses a simple makefile build system. You should define ARCH= at build time, otherwise the build system will attempt to guess using uname -m.

$ make ARCH=x86_64
$ make ARCH=x86_64 check
$ make ARCH=x86_64 DESTDIR=out install