Distributions like Fedora currently ship a statically compiled binutils
libbfd (an intrinsic dependency of libopcodes) that internally utilizes
zstd to decompress sections.
Because objtool resolves host dependencies sequentially via a manual HOSTCC
shell loop, build failures will occur (e.g. undefined reference to
'ZSTD_decompress') unless the loop probes for it.
Add the '-lopcodes -lbfd -liberty -lz -lzstd' combination to the fallback
chain, assuring successful compilation on hosts packaging static binutils.
Signed-off-by: Ian Rogers <irogers@google.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260909204122.1993010-1-irogers@google.com?part=4