Repository navigation
0.6.3: a core runner for an implementation without files, processes or threads; i386 images - #39
Merged
Merged
Conversation
Sunrisepeak
force-pushed
the
feat/0.6.3-core-runner
branch
from
November 13, 2026 08:57
b4b2ecd to
ba5865e
Compare
…r threads One interface (include/okrun.h, run/src/runner.h, the bindings) has two runners, selected in run/mcpp.toml by the interfaces the implementation provides (cfg(interface = ...), mcpp 2026.11.13.1). With openkal.fs, openkal.process, openkal.task, openkal.random and openkal.map it is the full runner (run/src/full), unchanged. Without any of them it is the core runner (run/src/core), which runs what the program carries from memory --- an image, a group, or an archive --- with the same admission and loader, and without cache, snapshot or profiler; okrun_run_file refuses with the reason. A callback of an absent interface is absent, as its other names are. openkal-run requires only abort, env, exec, memory, stream and time.
Sunrisepeak
force-pushed
the
feat/0.6.3-core-runner
branch
from
November 13, 2026 11:36
ba5865e to
f0c2510
Compare
…bugged libokld opens an image of either class. A view widens an ELF32 header, program headers and dynamic table into the sixty-four bit forms, and reads symbols and relocations through accessors of the class; the bloom filter, packed relative relocations (a bitmap of 31 entries) and the word a relocation writes follow the class. An i386 image states its addends (RELA, `-z rela`); a REL image is refused with that option named. The relocations applied are R_386_RELATIVE, R_386_32, R_386_GLOB_DAT and R_386_JMP_SLOT. The runner enters an i386 image and its callbacks in the System V i386 convention (SPEC 12.2), with the x87 control word 0x037F and MXCSR 0x1F80 where the processor has SSE, asked once by CPUID. okb names the architecture i686. The debugger object is of the image's class: i386's retained REL relocations carry their addend in the word, so the object holds each R_386_32 and R_386_PC32 word less the resolved value. Measured: an i686-openkal image (C++23, import std, an exception across a frame) runs under okrun built for i686-linux-musl on x86-64 Linux, and gdb stops at a source line of it and unwinds into the runner.
…ates addends and builds for i686
…OS's carrier, executes no CMPXCHG8B
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One interface (
include/okrun.h,run/src/runner.h, the bindings) has two runners.run/mcpp.tomlselects one by the interfaces the implementation provides, withcfg(interface = "openkal.fs")(mcpp 2026.11.13.1, a general layer key answered from[kernel-abi] provides-interfaces). No implementation is named and no file is guarded by a macro.openkal.fs,openkal.process,openkal.task,openkal.randomandopenkal.map: the full runner (run/src/full), unchanged.run/src/core). What the program carries runs from memory (okrun_run_bytes,okrun_run_images,okrun_run_okb_bytes) with the same admission (requirements note, architecture, signature) and the same loader. It has no cache, snapshot or profiler;okrun_run_filerefuses with the reason.openkal.abort,openkal.env,openkal.exec,openkal.memory,openkal.streamandopenkal.time, and mcpp >= 2026.11.13.1.i386 images (ELFCLASS32,
EM_386; openkal 0.25.1, clauses 5.5 and 12.2):-z rela); a REL image is refused, with that option named. The loader appliesR_386_RELATIVE,R_386_32,R_386_GLOB_DATandR_386_JMP_SLOT.0x037F, and with MXCSR0x1F80where CPUID (asked once) reports SSE. okb names the architecturei686.R_386_32/R_386_PC32word is rewritten to that addend. A new builder case covers this; builder 65 and loader 9 pass under ASan/UBSan/LSan.examples/build-image.shtakesi686, and states addends for every architecture.Verified locally with the mcpp branch:
ldtests pass.The full okrun runs an
import stdimage (exception, map, format, vector) from a file on Linux x86_64, status 42;--prof=callsalso gives 42.A UEFI carrier selects the core runner above openkal-uefi 0.10.0 and runs the same image under OVMF (QEMU q35) through dirun, status 42.
An
i686-openkalimage (C++23,import std, exception) runs under an okrun built fori686-linux-muslon x86_64 Linux, status 7; gdb stops at a source line of it and unwinds into the runner. The examples hello (contexts with emulated TLS), needed (an.okso) and an okb of x86_64 + i686 run there too.CI runs against the mcpp branch (
MCPP_SOURCE_REF) until 2026.11.13.1 is released.