libucontext/README.md

42 lines
1.1 KiB
Markdown
Raw Normal View History

2018-01-30 03:56:01 +00:00
# `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:
2018-01-30 03:56:01 +00:00
2018-02-01 01:28:19 +00:00
* x86
2018-01-30 03:56:01 +00:00
* x86_64
2018-01-31 04:13:42 +00:00
* armv6+ (`arm`)
2018-01-31 21:23:18 +00:00
* aarch64
2018-02-15 05:55:26 +00:00
* s390x
* mips (O32 ABI only)
* mips64 (N32/N64 ABI only, like Alpine, only N64 ABI has been tested)
2020-05-18 03:28:21 +00:00
* riscv64
2020-12-06 08:25:53 +00:00
* m68k
These archs require kernel assistance and use a syscall:
2018-02-02 18:45:42 +00:00
* ppc
2018-02-06 08:05:53 +00:00
* ppc64 (ELFv2 ABI spec only, ELFv1 not supported)
2018-02-14 03:06:01 +00:00
## 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
2020-05-18 03:28:21 +00:00
```