Ariadne Conill
638770cfd0
x86_64: add static assert verifying memory layout
2021-01-08 02:56:45 -07:00
Ariadne Conill
39a2958561
add previous ABI symbols
2021-01-08 02:30:50 -07:00
Daniel Kolesa
cf05112306
ppc, ppc64: use common ALIAS/FUNC/END macros
2021-01-08 04:52:46 +01:00
Daniel Kolesa
6026980cac
ppc, ppc64: tag global symbols as functions
...
it is necessary to tag these symbols as functions otherwise the
linker gets confused; this previously manifested as the internal
functions (pre-rename) like __getcontext leaking into the symbol
table of things linked against libucontext that used the ucontext
POSIX API through the weak aliases
it also had another bad effect and that is if you tried to use
libucontext's API (post-rename), the linker would warn you during
compile time that the type is unknown, and the resulting program
would crash at runtime
after properly tagging everything, I no longer notice any leakage,
i.e. there don't seem to be any references to the aliased symbols
in the resulting symbol table when using the aliases, and using
the libucontext prefixed symbols directly also works
2021-01-08 04:27:27 +01:00
Ariadne Conill
d81154a61c
riscv64: port to C trampoline
2020-12-12 00:08:48 -07:00
Ariadne Conill
11a40293be
riscv64: simplify the context swapping
2020-12-12 07:05:09 +00:00
Ariadne Conill
22b91690bc
aarch64: move to C trampoline
2020-12-12 06:43:58 +00:00
Ariadne Conill
afcca79d7b
arm: move to C trampoline
2020-12-12 06:40:27 +00:00
Ariadne Conill
388edbe121
x86: port to use common trampoline
2020-12-12 06:32:01 +00:00
Ariadne Conill
b6542e1a6a
m68k: port to use common trampoline
2020-12-12 00:17:26 -06:00
Ariadne Conill
09d3f81dcf
sh: use new common trampoline
2020-12-12 06:08:33 +00:00
Ariadne Conill
2d51d7bfa4
x86_64: add common trampoline code written in C, port to it
2020-12-11 23:04:47 -07:00
Ariadne Conill
5c3ca5a7e1
sh: add freestanding bits
2020-12-12 06:02:47 +00:00
Ariadne Conill
8d58adb3ba
sh: fix up setcontext/swapcontext
2020-12-12 05:57:58 +00:00
Ariadne Conill
dd7ef8a806
sh: makecontext: fix stack alignment
2020-12-12 05:04:39 +00:00
Ariadne Conill
f9a3f65f5b
sh: fix getcontext implementation
2020-12-12 05:04:17 +00:00
Ariadne Conill
82f734ab47
sh: makecontext: set up stack pointer in r15
2020-12-12 04:53:50 +00:00
Ariadne Conill
da3c8d170f
sh: add remaining port files
2020-12-11 23:18:04 +00:00
Ariadne Conill
a42fb86da0
sh: add plausible swapcontext implementation
2020-12-11 22:37:21 +00:00
Ariadne Conill
00261d70e8
sh: add plausible setcontext implementation
2020-12-11 22:25:23 +00:00
Ariadne Conill
fd06f42bc3
sh: add first attempt at a getcontext implementation
2020-12-11 21:58:56 +00:00
Ariadne Conill
2692ecf74a
sh: defs: define REG_GBR, REG_MACH, REG_MACL
2020-12-11 21:35:12 +00:00
Ariadne Conill
42a4fbe9d1
sh: add makecontext
2020-12-11 21:13:20 +00:00
Ariadne Conill
c10cde83da
ppc: fix build with libucontext_ namespacing changes
2020-12-06 14:04:22 +00:00
Ariadne Conill
a04dc12d72
aarch64: add freestanding port
2020-12-06 13:50:50 +00:00
Ariadne Conill
f3f52fc17c
arm: add freestanding port
2020-12-06 13:43:04 +00:00
Ariadne Conill
7d149e6358
mips: add freestanding port
2020-12-06 06:34:56 -07:00
Ariadne Conill
20fd2b6f52
mips64: add freestanding port
2020-12-06 06:24:50 -07:00
Ariadne Conill
0c6077854a
riscv64: add freestanding port
2020-12-06 06:10:00 -07:00
Ariadne Conill
50bb9432c8
s390x: add freestanding port
2020-12-06 12:37:08 +00:00
Ariadne Conill
b33c7df219
s390x: update makecontext prototype
2020-12-06 12:30:44 +00:00
Ariadne Conill
da736b6add
ppc64: chase API changes related to freestanding stuff
...
freestanding is however NOT supported here
2020-12-06 12:23:09 +00:00
Ariadne Conill
131e825f50
x86: add freestanding port
2020-12-06 11:37:19 +00:00
Ariadne Conill
9c0ffd8fbb
x86: fix conflicts with musl headers + freestanding adaptations
2020-12-06 11:24:23 +00:00
Ariadne Conill
9aef11752f
x86_64: add freestanding port
2020-12-06 03:22:27 -07:00
Ariadne Conill
a8415a0c4e
m68k: add freestanding bits.h file
2020-12-06 03:53:45 -06:00
Ariadne Conill
c31decc3d4
build: use internal definitions to replace things pulled in from ucontext.h
2020-12-06 03:44:45 -06:00
Ariadne Conill
40c8016144
bits: alias greg_t as libucontext_greg_t in non-freestanding builds
2020-12-06 03:40:55 -06:00
Ariadne Conill
0953d71ed1
build: fill in more details for freestanding builds
2020-12-06 03:31:48 -06:00
Ariadne Conill
2979186379
common: define libucontext_ucontext_t for non-freestanding case
2020-12-06 03:18:41 -06:00
Ariadne Conill
e65e485630
everywhere: rename __swapcontext to libucontext_swapcontext
2020-12-06 03:04:22 -06:00
Ariadne Conill
37fe7afd5f
everywhere: rename __setcontext to libucontext_setcontext
2020-12-06 03:03:07 -06:00
Ariadne Conill
99ed5bbe12
everywhere: rename __getcontext to libucontext_getcontext
2020-12-06 03:02:25 -06:00
Ariadne Conill
2f31efaa95
everywhere: rename __start_context to better descriptive libucontext_trampoline
2020-12-06 02:59:59 -06:00
Ariadne Conill
c693dc663c
rename __makecontext to libucontext_makecontext
2020-12-06 02:56:59 -06:00
Ariadne Conill
fe19127c66
build: add support for EXPORT_UNPREFIXED=no
...
In an EXPORT_UNPREFIXED=no build, getcontext/makecontext/setcontext/swapcontext
symbols are not provided.
2020-12-06 02:54:01 -06:00
Ariadne Conill
15ba7b039c
m68k: add startcontext trampoline
2020-12-06 02:24:49 -06:00
Ariadne Conill
5f6135c0f9
m68k: fixups for makecontext
2020-12-06 02:24:05 -06:00
Ariadne Conill
22520be2de
m68k: fix register layout off by one
2020-12-06 00:52:05 -06:00
Ariadne Conill
89536b198d
m68k: add swapcontext
2020-12-06 00:04:50 -06:00