Files
Khem Raj 06117c896a leancrypto: Fix FIPS integrity digest generation when cross compiling
The script that inserts the FIPS integrity digest into
libleancrypto-fips runs the build host's objcopy, which cannot read the
target ELF file, and it hides the failure because "exit $?" after echo
returns 0. The library is then installed with the placeholder digest,
its integrity self-test fails at load time and all algorithms are put
into the error state.

Make the script use $OBJCOPY, which points to the target objcopy, keep
the exit status of failing commands, and tolerate a missing .init
section which llvm-objcopy otherwise errors out on.

Tested by loading the riscv64 musl library under qemu-riscv64: the
integrity test now passes and FIPS140Mode is reported as true.

AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-10-19 23:23:39 -07:00
..
2026-08-19 00:52:57 -07:00
2026-08-19 00:52:57 -07:00