[BUG] Standalone service build can succeed without its declared entry point #2

Open
opened 2026-09-12 12:14:34 +02:00 by erikinkinen · 0 comments
Owner

Summary

The standalone e2fsd CI freestanding build does not select the repository linker script. On Rust 1.97.1, the existing command returns success while rust-lld reports a missing default entry symbol. The retained local ELF has entry address zero and lacks the declared e2fsd_entry symbol. This command therefore does not establish a correctly linked standalone service.

Reproduction

Use e2fsd production sources from commit f3eec737b7, the unchanged exact Git dependency revisions, and Rust 1.97.1. Prepare original sources through Integration e2b1cf5995bcf6334839cda9a013e90fa97787d5, then run from the repository:

RUSTFLAGS="-D warnings" cargo build --locked --offline \
  --target x86_64-unknown-none --features e2fsd-runtime
readelf -hW target/x86_64-unknown-none/debug/e2fsd
nm --defined-only target/x86_64-unknown-none/debug/e2fsd

An explicitly selected target output directory was used for the retained local checks; adjust the inspection paths accordingly. The same omitted-script configuration was also built once with --all-features. Both commands returned zero with the same missing-entry warning; both retained ELF files have entry address zero. No guest or boot-image execution is part of this reproduction.

Expected and actual behavior

Expected: the standalone link uses the existing linker.ld, whose ENTRY(e2fsd_entry), text placement and __e2fs_state_arena_start definition describe this binary. Any linker warning must fail the purported warning-free build.

Actual: the workflow's freestanding build step calls cargo build without the linker script. The selected linker instead searches for _start. Rust 1.97.1 reports rust-lld: cannot find entry symbol _start; not setting start address, followed by a note that linker_messages ignores -D warnings. The build returns zero. The local runtime/all-feature ELF headers show entry zero, and the declared e2fsd_entry symbol is absent.

The proposed correction uses cargo rustc --bin e2fsd and passes the existing linker script plus --fatal-warnings to the final link. It adds no production entry point or capability. A standalone link with placeholder deployment capacities is not a packaged, runnable service image.

Environment and identity

  • Component: e2fsd f3eec737b7. Only a new host quota test and its registration were present during local validation; freestanding production code and linker.ld were unchanged. The standalone workflow's existing build command at this base is the affected route.
  • Dependencies: all 11 external Cargo package IDs retain their manifest-selected full Git commits; 417 dependency worktree files were independently compared with original Git blobs. Source preparation used reviewed Integration e2b1cf5995bcf6334839cda9a013e90fa97787d5.
  • Configuration: standalone host-side debug build for x86_64-unknown-none, default plus e2fsd-runtime or all features; no image profile, guest or firmware is involved.
  • Toolchain: rustc 1.97.1, commit 8bab26f4f68e0e26f0bb7960be334d5b520ea452; Cargo 1.97.1, commit c980f4866141969fab6254a680546a277789d6f0. Original Git cache, offline Cargo and explicitly selected host output were used.
  • Last known working standalone linker invocation: not established. The separately maintained Integration dynamic-service builder already selects the service entry and linker script, and is not the affected command.

Evidence and prior checks

Standalone CI run 171 at the exact base commit completed successfully. Its complete Rust job 19216 log used Rust 1.93.1 and the same missing-script command. The full Rust and Markdown logs contain no warning lines. This historical log must not be described as warningful, and its ELF artifact was not available for direct inspection.

The current local Rust 1.97.1 runtime/all-feature commands both returned zero but failed warning-free acceptance. Their complete original logs, statuses and ELF files are retained. The runtime ELF SHA-256 is b8c20ca6b6522a1b469214812b14eb5f381d38d9618f66db37570f152255a252; the all-feature ELF SHA-256 is babeef33d118b5e3daf36137d8a40545d5841d36d94a611a8144a38eada95b0a. Each had a 600-second hard and 120-second output-stall budget.

The host quota test and both full 259-test suites passed. Host/freestanding Clippy and rustdoc were warning-free. These successes did not validate the final freestanding ELF entry. The corrected explicit linker-script invocation passes runtime and all-feature debug/release links without warnings; each entry address is 0x64000000 and equals the defined e2fsd_entry symbol, and each contains the required arena symbol. The correction is published in signed commit 829c225767 and WIP PR #3. The final host suites contain 261 passing tests each, including explicit checker selection and failure/evidence precedence checks; current-revision CI is tracked separately. No connection to the guest quota timeout is asserted.

Tracking

Owner: e2fsd standalone CI build configuration; related component audit #1 and the separate quota VM timeout. Preserve the exact helper pin and existing service feature selection. Regression acceptance requires warning-free runtime/all-feature debug/release links whose ELF entry equals the defined e2fsd_entry symbol and which contain the required arena symbol. Keep the original false-success evidence. This correction does not establish full image-build or guest completion acceptance.

## Summary The standalone e2fsd CI freestanding build does not select the repository linker script. On Rust 1.97.1, the existing command returns success while rust-lld reports a missing default entry symbol. The retained local ELF has entry address zero and lacks the declared e2fsd_entry symbol. This command therefore does not establish a correctly linked standalone service. ## Reproduction Use e2fsd production sources from commit f3eec737b7bc3cc9f60f09db32b95041e85bd521, the unchanged exact Git dependency revisions, and Rust 1.97.1. Prepare original sources through Integration e2b1cf5995bcf6334839cda9a013e90fa97787d5, then run from the repository: ```sh RUSTFLAGS="-D warnings" cargo build --locked --offline \ --target x86_64-unknown-none --features e2fsd-runtime readelf -hW target/x86_64-unknown-none/debug/e2fsd nm --defined-only target/x86_64-unknown-none/debug/e2fsd ``` An explicitly selected target output directory was used for the retained local checks; adjust the inspection paths accordingly. The same omitted-script configuration was also built once with --all-features. Both commands returned zero with the same missing-entry warning; both retained ELF files have entry address zero. No guest or boot-image execution is part of this reproduction. ## Expected and actual behavior Expected: the standalone link uses the existing linker.ld, whose ENTRY(e2fsd_entry), text placement and __e2fs_state_arena_start definition describe this binary. Any linker warning must fail the purported warning-free build. Actual: the workflow's freestanding build step calls cargo build without the linker script. The selected linker instead searches for _start. Rust 1.97.1 reports `rust-lld: cannot find entry symbol _start; not setting start address`, followed by a note that linker_messages ignores -D warnings. The build returns zero. The local runtime/all-feature ELF headers show entry zero, and the declared e2fsd_entry symbol is absent. The proposed correction uses cargo rustc --bin e2fsd and passes the existing linker script plus --fatal-warnings to the final link. It adds no production entry point or capability. A standalone link with placeholder deployment capacities is not a packaged, runnable service image. ## Environment and identity - Component: e2fsd f3eec737b7bc3cc9f60f09db32b95041e85bd521. Only a new host quota test and its registration were present during local validation; freestanding production code and linker.ld were unchanged. The standalone workflow's existing build command at this base is the affected route. - Dependencies: all 11 external Cargo package IDs retain their manifest-selected full Git commits; 417 dependency worktree files were independently compared with original Git blobs. Source preparation used reviewed Integration e2b1cf5995bcf6334839cda9a013e90fa97787d5. - Configuration: standalone host-side debug build for x86_64-unknown-none, default plus e2fsd-runtime or all features; no image profile, guest or firmware is involved. - Toolchain: rustc 1.97.1, commit 8bab26f4f68e0e26f0bb7960be334d5b520ea452; Cargo 1.97.1, commit c980f4866141969fab6254a680546a277789d6f0. Original Git cache, offline Cargo and explicitly selected host output were used. - Last known working standalone linker invocation: not established. The separately maintained Integration dynamic-service builder already selects the service entry and linker script, and is not the affected command. ## Evidence and prior checks [Standalone CI run 171](https://git.erikinkinen.fi/erix/e2fsd/actions/runs/171) at the exact base commit completed successfully. Its complete Rust job 19216 log used Rust 1.93.1 and the same missing-script command. The full Rust and Markdown logs contain no warning lines. This historical log must not be described as warningful, and its ELF artifact was not available for direct inspection. The current local Rust 1.97.1 runtime/all-feature commands both returned zero but failed warning-free acceptance. Their complete original logs, statuses and ELF files are retained. The runtime ELF SHA-256 is b8c20ca6b6522a1b469214812b14eb5f381d38d9618f66db37570f152255a252; the all-feature ELF SHA-256 is babeef33d118b5e3daf36137d8a40545d5841d36d94a611a8144a38eada95b0a. Each had a 600-second hard and 120-second output-stall budget. The host quota test and both full 259-test suites passed. Host/freestanding Clippy and rustdoc were warning-free. These successes did not validate the final freestanding ELF entry. The corrected explicit linker-script invocation passes runtime and all-feature debug/release links without warnings; each entry address is 0x64000000 and equals the defined e2fsd_entry symbol, and each contains the required arena symbol. The correction is published in signed commit 829c2257676676db73aacd31ef4ba9c4ff0994c1 and [WIP PR #3](https://git.erikinkinen.fi/erix/e2fsd/pulls/3). The final host suites contain 261 passing tests each, including explicit checker selection and failure/evidence precedence checks; current-revision CI is tracked separately. No connection to the guest quota timeout is asserted. ## Tracking Owner: e2fsd standalone CI build configuration; related component audit #1 and the separate [quota VM timeout](https://git.erikinkinen.fi/erix/integration/issues/18). Preserve the exact helper pin and existing service feature selection. Regression acceptance requires warning-free runtime/all-feature debug/release links whose ELF entry equals the defined e2fsd_entry symbol and which contain the required arena symbol. Keep the original false-success evidence. This correction does not establish full image-build or guest completion acceptance.
Sign in to join this conversation.
No description provided.