1 Commits
Author SHA1 Message Date
Khem Raj 25d07812fb leancrypto: Fix FIPS library link with lld on musl
The FIPS integrity linker script takes ADDR(.init) for the hashed
regions, but musl provides no .init section on riscv64. GNU ld accepts
the reference to the missing section and yields an empty range, while
lld errors out:

  ld.lld: error: internal/src/fips_integrity_check.ld:11: undefined section .init

Use ADDR(.init) only when the section has a size, and otherwise an
empty range at the start of .text, matching GNU ld behaviour.

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