44it faithfully follows the kernel process ABI when doing context swaps.
55
66Notably, when combined with ` gcompat ` , it provides a fully compatible implementation of the ucontext
7- functions that are ABI compatible with glibc.
8-
9- Since version 0.13, for some architectures, you can deploy to bare metal using newlib via the
10- ` FREESTANDING=yes ` make option. Systems which use a syscall cannot work this way. The table
11- below shows which architecture ports have been adapted to build with ` FREESTANDING=yes ` .
7+ functions that are ABI compatible with glibc on most architectures.
128
139Adding support for new architectures is easy, but you need to know assembly language for the
1410target to do it.
1511
16-
1712## supported features
1813
1914### tier 1 architectures
@@ -25,7 +20,7 @@ These architectures are tested with CI using either Alpine or Adélie Linux.
2520| aarch64 | ✓ | ✓ | | ✓ | ✓ |
2621| arm | ✓ | ✓ | | ✓ | ✓ |
2722| loongarch64 | ✓ | | | ✓ | |
28- | ppc64 | ✓ | ✓ | ✓ | | |
23+ | ppc64 | ✓ | ✓ | ✓ | ✓ | |
2924| riscv64 | ✓ | ✓ | | ✓ | ✓ |
3025| s390x | ✓ | ✓ | | ✓ | |
3126| x86 | ✓ | ✓ | | ✓ | |
@@ -49,6 +44,19 @@ investigated yet.
4944| riscv32 | ✓ | | | ✓ | ✓ |
5045| sh | ✓ | | | ✓ | ✓ |
5146
47+ ## freestanding mode
48+
49+ Since version 0.13, for some architectures, you can deploy to bare metal using newlib via the
50+ ` FREESTANDING=yes ` make option. Systems which use a syscall cannot work this way. The table
51+ above shows which architecture ports have been adapted to build with ` FREESTANDING=yes ` .
52+
53+ Applications consuming libucontext in freestanding mode must use the native libucontext APIs directly
54+ rather than the POSIX ` ucontext.h ` APIs.
55+
56+ Freestanding mode is also recommended for distributions which want to provide fast userspace context
57+ swapping without adherence to a given libc context ABI where applications will only use libucontext
58+ directly.
59+
5260## building
5361
5462` libucontext ` uses a simple makefile build system. You should define ` ARCH= ` at build time, otherwise
0 commit comments