linux-core contains platform guards, C-string helpers, and low-level symbol
resolution/dispatch for Linux shared libraries.
This module is the base layer used by Linux loader, libc, and X11 helpers.
core := import('linux-core')
Returns true when the current host OS is Linux.
Returns s with a trailing null byte (\0) for C ABI calls.
Reads a null-terminated string from memory starting at ptr, up to maxLen
bytes.
Returns a standardized Linux-only error object:
{type: :error, error: apiName + ' is only available on Linux'}
Recursively attempts sys.resolve over a candidate library list.
Calls sys.call(resolved.proc, args...) when resolved.type is :ok.
Otherwise returns resolved unchanged.
Resolves symbol using the first working entry in LibC.
Resolves symbol from an explicit library.
Direct pass-through to sys.call on Linux hosts.
Resolve + call against LibC candidates.
Resolve + call against LibDL candidates.
- All public calls are OS-gated.
- On non-Linux hosts, Linux-only calls return
{type: :error, ...}objects.