Skip to content

Commit 9617b6e

Browse files
committed
tests: llext: Improve compatibility with 64-bit platforms
Cast elf32_off/elf64_off to uint64_t and use %llu format specifier to ensure compatibility with both 32-bit and 64-bit platforms. Signed-off-by: Tim Pambor <[email protected]>
1 parent 2d72d86 commit 9617b6e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/subsys/llext/src/test_llext.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,8 @@ ZTEST(llext, test_find_section)
523523
res = llext_get_section_header(loader, ext, ".data", &shdr);
524524
zassert_ok(res, "get_section_header() should succeed");
525525
zassert_equal(shdr.sh_offset, section_ofs,
526-
"different section offset %zd from get_section_header", shdr.sh_offset);
526+
"different section offset %llu from get_section_header",
527+
(uint64_t)shdr.sh_offset);
527528

528529
uintptr_t symbol_ptr = (uintptr_t)llext_find_sym(&ext->exp_tab, "number");
529530
uintptr_t section_ptr = (uintptr_t)find_section_ext + section_ofs;

0 commit comments

Comments
 (0)