WIP: Preserve symbol semantics and plan original TLS images #3

Closed
erikinkinen wants to merge 14 commits from feature/posix-compat into main
Owner

Summary and rationale

Preserve original symbol-provider semantics and plan immutable TLS registries and initial images using caller-owned storage. Keep exact relocation arithmetic and target validation while separating plans from native memory and lifecycle authority.

Tracking and scope

The linked component audit, implementation and consumer requirements remain part of this WIP review. The phase-wide guest and toolchain build requirements stay with the phase completion issue.

Architecture, authority and failure behavior

The planner remains allocation-free and performs no I/O or capability operations. Original object bytes, graph membership, target ranges and explicit deployment geometry supply its inputs. The immutable TLS registry preserves original module order, source prefixes and image geometry; a fresh thread image never copies another thread's writable TLS state.

Original provider selection precedes address arithmetic and kind validation. An unused overflowing weak candidate cannot reject a valid selected strong provider, and unrelated TLS exports cannot reject an ordinary defined local symbol. Genuine selected-provider, target and arithmetic errors still refuse. GLOB_DAT and eager JUMP_SLOT use the resolved symbol value S without the unused RELA addend; absolute and relative relocations retain checked S+A and B+A.

TLS template and image production returns data plans and writes only explicit caller-owned image storage after complete preflight. Exact-width patches retain original template ownership and destination extents. The library obtains no object, mapping, process or publication authority.

Complete libc TLS/errno/resolver consumers, synchronized module lifetime, required native workload and source/frame/guest acceptance remain open. Original-source plans and accepted native member mechanisms do not establish complete dynamic ELF TLS admission.

Validation evidence

Formatting, strict Clippy, warning-denied builds and documentation, unit tests, and applicable native/VM and consumer regressions remain required for the declared scope. Authored controls and older successful runs do not establish current full acceptance.

Review checklist

  • Original specification-derived implementation and independent regression controls.
  • Signed canonical commit and full-commit dependency policy.
  • Rustdoc, strict local checks and cohesive code files below 1,000 lines.
  • Relevant README, ARCHITECTURE and ROADMAP updated; canonical governance unchanged.
  • Complete downstream candidate and manual/API evidence.
  • Classify both matching automatic CI runs and preserve remaining adoption gates.
  • Complete coherent consumer/catalog adoption and applicable existing VM evidence.

This review remains WIP until its declared scope and dependent requirements are complete.

## Summary and rationale Preserve original symbol-provider semantics and plan immutable TLS registries and initial images using caller-owned storage. Keep exact relocation arithmetic and target validation while separating plans from native memory and lifecycle authority. ## Tracking and scope - [docs PR #4](https://git.erikinkinen.fi/erix/docs/pulls/4) - [meta #2](https://git.erikinkinen.fi/erix/meta/issues/2) - [lib-dynlink #2](https://git.erikinkinen.fi/erix/lib-dynlink/issues/2) - [lib-dynlink #1](https://git.erikinkinen.fi/erix/lib-dynlink/issues/1) - [integration #65](https://git.erikinkinen.fi/erix/integration/issues/65) The linked component audit, implementation and consumer requirements remain part of this WIP review. The phase-wide guest and toolchain build requirements stay with the phase completion issue. ## Architecture, authority and failure behavior The planner remains allocation-free and performs no I/O or capability operations. Original object bytes, graph membership, target ranges and explicit deployment geometry supply its inputs. The [immutable TLS registry](https://git.erikinkinen.fi/erix/lib-dynlink/src/branch/feature/posix-compat/docs/tls-registry.md) preserves original module order, source prefixes and image geometry; a fresh thread image never copies another thread's writable TLS state. Original provider selection precedes address arithmetic and kind validation. An unused overflowing weak candidate cannot reject a valid selected strong provider, and unrelated TLS exports cannot reject an ordinary defined local symbol. Genuine selected-provider, target and arithmetic errors still refuse. GLOB_DAT and eager JUMP_SLOT use the resolved symbol value S without the unused RELA addend; absolute and relative relocations retain checked S+A and B+A. [TLS template and image production](https://git.erikinkinen.fi/erix/lib-dynlink/src/branch/feature/posix-compat/docs/thread-tls.md) returns data plans and writes only explicit caller-owned image storage after complete preflight. Exact-width patches retain original template ownership and destination extents. The library obtains no object, mapping, process or publication authority. Complete libc TLS/errno/resolver consumers, synchronized module lifetime, required native workload and source/frame/guest acceptance remain open. Original-source plans and accepted native member mechanisms do not establish complete dynamic ELF TLS admission. ## Validation evidence Formatting, strict Clippy, warning-denied builds and documentation, unit tests, and applicable native/VM and consumer regressions remain required for the declared scope. Authored controls and older successful runs do not establish current full acceptance. ## Review checklist - [x] Original specification-derived implementation and independent regression controls. - [x] Signed canonical commit and full-commit dependency policy. - [x] Rustdoc, strict local checks and cohesive code files below 1,000 lines. - [x] Relevant README, ARCHITECTURE and ROADMAP updated; canonical governance unchanged. - [x] Complete downstream candidate and manual/API evidence. - [x] Classify both matching automatic CI runs and preserve remaining adoption gates. - [ ] Complete coherent consumer/catalog adoption and applicable existing VM evidence. This review remains WIP until its declared scope and dependent requirements are complete.
fix: Preserve symbol-only relocation values
All checks were successful
CI / markdown (push) Successful in 8s
CI / test (push) Successful in 32s
CI / markdown (pull_request) Successful in 14s
CI / test (pull_request) Successful in 38s
abd5153adf
Compute GLOB_DAT and eager JUMP_SLOT as the resolved symbol value, ignoring
the unused RELA addend. Keep checked S+A and B+A for absolute and relative
records, with unchanged provider selection and writable target validation.

Add nine independent expression and ownership controls; five distinguish
the original defect while four retain existing arithmetic and range rules.
Pass four strict 47-test configurations and native builds. Deny warnings
in CI and document the exact psABI expressions.
ci: Skip duplicate same-repository pull request jobs
All checks were successful
CI / markdown (pull_request) Has been skipped
CI / test (pull_request) Has been skipped
CI / markdown (push) Successful in 6s
CI / test (push) Successful in 33s
cc87cbb5a4
Skip pull-request jobs when the head and base repository names match,
since push CI already covers these branches. Retain fork pull-request,
push and manual execution and existing release publication conditions.
Apply the guard before any job steps, including Markdown validation.

Test execution and CI observation are deferred at the user's request;
no execution result is claimed for this workflow-only change.
feat: Plan original thread TLS images and relocation patches
Some checks failed
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Failing after 4s
CI / test (push) Failing after 19s
f5ccc74faa
Retain original module templates in caller-counted VariantII layout and build
the explicit self/DTV/errno TCB plus sparse counted DTV only after full image
preflight. Preserve STT_TLS module offsets, correlate exact original graph
modules and validate complete 4/8/16-byte TLS relocation targets and expressions
before output publication. Keep ordinary runtime TLS refusal and a distinct
patch type; split fixture serializers from the large test module and author
independent image, symbol, expression, provider and late-refusal controls.

Tests, builds, lint checks, generated documentation, VM/profiler execution and
CI observation remain deferred. Rustfmt was applied through stdin. No test
pass, warning-free build or measured performance improvement is claimed.
Full EriX guest generations and external Rust/LLVM guest rebuilding remain
required and unperformed.
erikinkinen changed title from WIP: Correct symbol-only relocation values to WIP: Preserve symbol semantics and plan original TLS images 2026-10-11 22:30:53 +02:00
fix: Validate only the selected original symbol provider
Some checks failed
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Failing after 6s
CI / test (push) Failing after 19s
f41fe92c8b
Select the original defining object and symbol before load-address arithmetic
and TLS kind validation. Preserve local definitions, strong-before-weak imports
and missing weak behavior while preventing an unused weak value or unrelated
TLS export from rejecting the actual provider. Share this selection across
ordinary and TLS graph planning, preserve selected overflow and target refusal,
and author four independent ordering, arithmetic and kind controls.

Resolve the source defect recorded in LibDynlink issue 5; complete native TLS
runtime and imported consumer acceptance remain open.

Tests, builds, lint checks, generated documentation, VM/profiler execution and
CI observation remain deferred. Rustfmt was applied through stdin. No test
pass, warning-free build or measured performance improvement is claimed.
Full EriX guest generations and external Rust/LLVM guest rebuilding remain
required and unperformed.
docs: Distinguish native TLS admission from ELF producer adoption
Some checks failed
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Failing after 3s
CI / test (push) Failing after 16s
ef7b2d1b0c
Describe original initial Process/stage opaque TLS admission while preserving
actual ELF producer, libc and full lifecycle/consumer requirements. The Kernel
does not invent a TCB/DTV policy or replace loader/template provenance. Legacy
ordinary ELF production remainsFS0 until coherent image producer migration.

Tests, builds, lint checks, generated documentation, VM/profiler execution and
CI observation remain deferred. Rustfmt was applied through stdin. No test
pass, warning-free build or measured performance improvement is claimed.
Full EriX guest generations and external Rust/LLVM guest rebuilding remain
required and unperformed.
feat: Retain immutable original TLS registries
Some checks failed
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Failing after 2s
CI / test (push) Failing after 13s
f6a21d6399
Encode and parse caller-counted canonical ERR1 registry bytes with complete
original module/object/prefix association, duplicate and extent preflight.
Bind the production TCB registry extension to the same original image, and
select descriptor exports from original executable graph code. Author literal
registry, fresh-image and provider/refusal controls without native authority.

Tests, builds, lint checks, generated documentation, VM/profiler execution and
CI observation remain deferred. Rustfmt was applied through stdin. No test
pass, warning-free build or measured performance improvement is claimed.
Full EriX guest generations and external Rust/LLVM guest rebuilding remain
required and unperformed.
ci: Adopt the signed original Git dependency helper
Some checks failed
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 6s
CI / test (push) Failing after 19s
f012b79e1a
Select the verified immutable Integration helper that preserves actual
Git objects and denies registry dependencies without obsolete path
patches. Retain every duplicate same-repository PR guard. Where needed,
adopt the coherent signed ABI graph and preserve original authority and
validation budgets. Maintain canonical documentation formatting.

Tests and exact-head CI run in parallel with implementation. Earlier failed,
skipped or unrun checks remain distinct from actual passes. Keep the full
EriX guest build generations and external Rust/LLVM guest rebuild required;
no final all-repository CI success or guest completion is claimed.
test: Observe independent TLS images and correct packed-prefix refusal
All checks were successful
CI / markdown (pull_request) Has been skipped
CI / test (pull_request) Has been skipped
CI / markdown (push) Successful in 5s
CI / test (push) Successful in 25s
c069f6062c
Read the mutated first image while proving the other image and original module
remain unchanged. Make the invalid packed-prefix fixture alter the actual
encoded word rather than rewriting its existing zero low byte. Preserve raw
zero-alignment refusal and independently confirm ELF zero alignment encodes
canonical alignment one. Formatting, strict Clippy and all 76 unit controls
pass; exact signed-head CI runs in parallel. Keep complete TLS and guest scope.
ci: Adopt the signed original Git dependency helper
All checks were successful
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 4s
CI / test (push) Successful in 34s
512bac1179
Select the verified immutable Integration helper that preserves actual
Git objects and denies registry dependencies without obsolete path
patches. Retain every duplicate same-repository PR guard. Where needed,
adopt the coherent signed ABI graph and preserve original authority and
validation budgets. Maintain canonical documentation formatting.

Tests and exact-head CI run in parallel with implementation. Earlier failed,
skipped or unrun checks remain distinct from actual passes. Keep the full
EriX guest build generations and external Rust/LLVM guest rebuild required;
no final all-repository CI success or guest completion is claimed.
ci: Select the reviewed native process custody helper
Some checks failed
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 5s
CI / test (push) Failing after 11s
c0263be0c0
Select the coherent Integration source for dependency preparation and
native process ownership. This keeps helper inputs aligned with the
published runtime producer and refuses unsupported descriptor queries
before starting a child.
ci: Adopt the repaired native signal owner
All checks were successful
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 11s
CI / test (push) Successful in 47s
b30c558a50
Select the coherent Integration helper that admits observed default or
ignored reserved signals while preserving complete native action identity.
Keep the existing workflow commands and limits for Integration #118.
ci: Carry checked Cargo inputs through component jobs
Some checks are pending
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / test (push) Has started running
CI / markdown (push) Has started running
4e229c3444
Prepare Cargo inputs with the selected Integration helper and carry its
workspace, environment and target directory through the existing CI steps.
Keep shared dependency and review policies aligned.

Refs: erix/integration#142
ci: Select the repaired Cargo gateway
Some checks are pending
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / test (push) Has started running
CI / markdown (push) Has started running
7b560a5ee6
Use the shared gateway that selects installed Rust tools when a component
has no toolchain file. Keep tool selection, feature-branch resolution and
original source checks together in the pinned helper snapshot.

Refs: erix/integration#147
ci: Use the shared acquisition fix for packed Git transfers
All checks were successful
CI / markdown (push) Successful in 2s
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / test (push) Successful in 1m35s
dc6cbb3524
Use the shared acquisition fix for packed Git transfers. The pinned helper
keeps unexpected object-store metadata outside the acquired source context.

Refs: erix/integration#150
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:43 +01:00
Author
Owner

Replaced by #8, #9, #10, #11. These feature branches preserve the original source in separate changes. Closing this combined PR without merging it; the original branch is retained.

Replaced by [#8](https://git.erikinkinen.fi/erix/lib-dynlink/pulls/8), [#9](https://git.erikinkinen.fi/erix/lib-dynlink/pulls/9), [#10](https://git.erikinkinen.fi/erix/lib-dynlink/pulls/10), [#11](https://git.erikinkinen.fi/erix/lib-dynlink/pulls/11). These feature branches preserve the original source in separate changes. Closing this combined PR without merging it; the original branch is retained.
erikinkinen closed this pull request 2026-10-30 15:25:27 +01:00
All checks were successful
CI / markdown (push) Successful in 2s
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / test (push) Successful in 1m35s

Pull request closed

Sign in to join this conversation.
No description provided.