Skip to content

fix: link eboot_stage1 into test_recovery - #35

Merged
srpatcha merged 1 commit into
embeddedos-org:masterfrom
Diksha18Singh:fix/test-recovery-link
Aug 27, 2026
Merged

fix: link eboot_stage1 into test_recovery#35
srpatcha merged 1 commit into
embeddedos-org:masterfrom
Diksha18Singh:fix/test-recovery-link

Conversation

@Diksha18Singh

Copy link
Copy Markdown
Contributor

test_recovery failed to link with undefined symbols for eos_boot_log_append, eos_boot_log_read, and eos_boot_log_get_head.

core/recovery.c calls these functions (declared via a local extern matching the real implementation), but the implementation lives in stage1/boot_log.c, which is built into the eboot_stage1 library — not eboot_core, which is all test_recovery was linked against.

Fix: link eboot_stage1 into test_recovery, matching the dependency recovery.c actually has at runtime.

Verified: ctest --test-dir build --output-on-failure now shows 14/14 tests passing (previously 13/14, with test_recovery Not Run due to the link failure).

Note: this produces a harmless linker warning ("ignoring duplicate libraries: '../libeboot_core.a'"), since eboot_stage1 already links eboot_core internally. Not addressed here — flagging for visibility rather than silently leaving it unmentioned.

Separately, while investigating this I found that include/eos_boot_log.h declares different signatures for eos_boot_log_init and eos_boot_log_read than what stage1/boot_log.c actually implements, and that test_boot_log.c's test doubles match the header's (incorrect) signature rather than the real implementation. That's a distinct issue from this link fix and I'm opening it separately rather than folding it into this PR.

test_recovery failed to link with undefined symbols for
eos_boot_log_append, eos_boot_log_read, and eos_boot_log_get_head.

core/recovery.c calls these functions (declared via local extern
matching the real implementation), but the implementation lives in
stage1/boot_log.c, which is built into the eboot_stage1 library —
not eboot_core, which is all test_recovery was linked against.

Fix: link eboot_stage1 into test_recovery, matching the dependency
recovery.c actually has at runtime.

Verified: ctest --test-dir build --output-on-failure now shows
14/14 tests passing (previously 13/14, with test_recovery
Not Run due to the link failure).
@srpatcha
srpatcha merged commit e8e62fd into embeddedos-org:master Aug 27, 2026
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.

2 participants