Commit Graph

218 Commits (f3e0033a0697c2c38abb845115eb5a9a30b85cc5)

Author SHA1 Message Date
Daniel Kolesa f3e0033a06 meson: remove the subproject-based library checking
this is not idiomatic, and should not be done (and it did not even
work in the first place); meson is capable of building both
libraries via library() and then you can choose on commandline

it defaults to only shared, but we want both out of box, so specify
that
2021-01-08 15:56:42 +01:00
Daniel Kolesa 4801f0bdd8 all: mark the trampoline symbol hidden
this should not be a part of the public ABI
2021-01-08 15:17:13 +01:00
Daniel Kolesa 739894e9a7 meson: fix build 2021-01-08 15:17:13 +01:00
Daniel Kolesa efa6464e41 ppc, ppc64: do not use ALIAS for libucontext_swapcontext 2021-01-08 15:17:11 +01:00
osy d592961b1a build: add meson build 2021-01-08 04:25:56 -07:00
Ariadne Conill b1902729f7 aarch64: fix freestanding structure layout when building with clang 2021-01-08 11:19:01 +00:00
Ariadne Conill 5546fde1e5 aarch64: add static asserts for struct layout 2021-01-08 10:39:47 +00:00
Ariadne Conill 09f78ddc28 alias __makecontext too 2021-01-08 10:37:27 +00:00
osy fffb55011b arm: fix broken FETCH_LINKPTR 2021-01-08 03:20:14 -07:00
osy f7eed30132 build: guard _GNU_SOURCE define if build system defines it 2021-01-08 03:16:05 -07:00
Ariadne Conill 3064ad6dbc build: use head -n1 when reading VERSION 2021-01-08 03:12:33 -07:00
osy 9983d136af build: move version number to file 2021-01-08 03:11:47 -07:00
osy d31c95a11a build: remove -DLIBUCONTEXT_ASSEMBLY
Meson does not support separate defines for .S compile.
2021-01-08 03:11:25 -07:00
Ariadne Conill e4233715f3 mips: use PROC_NAME where appropriate 2021-01-08 03:10:10 -07:00
osy 163c11d989 build: support mach-o ABI 2021-01-08 03:05:06 -07:00
osy b6e60b5d64 include: missing stddef.h include for size_t 2021-01-08 03:04:01 -07:00
osy 73d5e101ad build: respect EXPORT_UNPREFIXED for libucontext_makecontext 2021-01-08 03:02:43 -07:00
Ariadne Conill e45956896a common-trampoline: use register keyword to force register allocation 2021-01-08 03:00:37 -07:00
osy e1e6508af2 defs: use register output only for FETCH_LINKPTR 2021-01-08 02:59:43 -07:00
Ariadne Conill 638770cfd0 x86_64: add static assert verifying memory layout 2021-01-08 02:56:45 -07:00
Ariadne Conill 78e880a29f test POSIX ABI compatibility in libucontext itself, too 2021-01-08 02:37:47 -07:00
Ariadne Conill 39a2958561 add previous ABI symbols 2021-01-08 02:30:50 -07:00
Ariadne Conill 5e6e421c54
Merge pull request #23 from q66/static-only-fix
build: depend on headers for the static target
2021-01-08 04:24:13 -05:00
Ariadne Conill 91c8837c93
Merge pull request #24 from q66/ppc-fixes
ppc, ppc64: tag global symbols as functions
2021-01-08 04:23:59 -05: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
Daniel Kolesa 03927d4c4c build: depend on headers for the static target
this fixes static-only build, i.e. "make libucontext.a"
2021-01-08 03:01:32 +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 6763b5ba1e README: note which archs support C trampoline 2020-12-11 23:53:09 -07:00
Ariadne Conill c986ba340e build: use ARCH=ppc64 by default on ppc64le 2020-12-12 06:46:08 +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 a6a64b0711 build: fix test_libucontext_posix linkage 2020-12-12 06:37:31 +00:00
Ariadne Conill 388edbe121 x86: port to use common trampoline 2020-12-12 06:32:01 +00:00
Ariadne Conill 3123bfdd9b gitignore: add a bunch of stuff 2020-12-11 23:23:08 -07:00
Ariadne Conill b6542e1a6a m68k: port to use common trampoline 2020-12-12 00:17:26 -06:00
Ariadne Conill b62ecd476c start NEWS for 1.0 2020-12-11 23:09:58 -07: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 71cbb6a3d3 README: note sh architecture is supported 2020-12-11 23:03:45 -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