Skip to content

0.22.0 --- the C library of an ok image (<arch>-openkal): ok_main, dlopen over libokld, dl_iterate_phdr, emulated TLS - #57

Merged
Sunrisepeak merged 4 commits into
mainfrom
openkal-0.17.0
Oct 26, 2026
Merged

Sunrisepeak merged 4 commits into
mainfrom
openkal-0.17.0

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

The image form of openkal-musl for the target <arch>-openkal (openkal SPEC clause 12; mcpp design 2026-10-26 part 2, §9).

  • port/src/image: ok_main (the entry SPEC 12.2 names), dlopen/dlsym/dladdr/dlclose/dlerror over libokld (a placed image's kal_* imports bound through a weak table generated from openkal's SURFACE.txt by build.mcpp; weak imports require no interface, SPEC 12.4), dl_iterate_phdr over this image and every placed one, __emutls_get_address, and a prioritised constructor that brings the library up before a program's constructors.
  • musl-generated/{x86_64,aarch64}-openkal: wint_t is int on <arch>-unknown-none-elf, checked by okm_type_identity.c.
  • Dependencies move to openkal 0.17.0 and its implementations (openkal-linux 0.18.0, openkal-macos 0.15.0, openkal-windows 0.13.0); the image form adds openkal-ld 0.1.0 and llvm.compiler-rt-builtins 22.1.8.6 (22.1.8.6: the 128-bit and 80-bit routines on the ok-image rows (<arch>-openkal) compiler-rt-builtins#4). CI reaches them through tools/working-trees.sh on the same-named branch.
  • examples/image-dlopen (eleven observations) and examples/image-early-constructor: built once on Linux for both architectures by the mcpp under review, then run through okrun on linux-x86_64, linux-aarch64, macos-arm64 and windows-x86_64.

Co-authored-by: speak-agent 248744407+speak-agent@users.noreply.github.com

Sunrisepeak and others added 3 commits October 26, 2026 22:21
…, the image's dl_iterate_phdr and emulated thread-local storage

The target <arch>-openkal (openkal SPEC clause 12) holds no implementation; the
loader binds the image's kal_* imports. port/src/image carries the entry, the
dl* family over libokld (a placed image's kal_* names bound through a weak
table of SURFACE.txt), dl_iterate_phdr over this image and every placed one,
__emutls_get_address, and a prioritised constructor that brings the library up
before a program's own. The specification and the implementations move to
openkal 0.17; the builtins come from llvm.compiler-rt-builtins 22.1.8.6.
examples/image-dlopen and image-early-constructor run through okrun on four
systems in CI.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…one compiler runtime per build

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…priority 1)

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…), and a context's own is refused

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
@Sunrisepeak
Sunrisepeak merged commit b806baa into main Oct 26, 2026
37 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant