Skip to content

Conversation

@bhcopeland
Copy link
Member

@bhcopeland bhcopeland commented Jan 12, 2026

docker: iadd binutils-dev for x86_64 objtool build
Recent kernel changes (commit 59953303827e "objtool: Disassemble code
with libopcodes instead of running objdump") require libopcodes for
x86_64 builds. The kernel's objtool Makefile detects libbfd and enables
disassembly support, which then requires libopcodes at link time.

Since libbinutils (which provides libbfd) is already installed in
Dockerfile.build, the build system enables BUILD_DISAS=y but fails to
link because libopcodes (from binutils-dev) was missing for native
builds.

Add binutils-dev to the base image to provide libopcodes for all builds.
Cross-compilation scenarios continue to work via the existing
binutils-dev:${arch} handling in Dockerfile.build.

Closes: #230

@bhcopeland bhcopeland changed the title docker: iadd binutils-dev for x86_64 objtool build docker: add binutils-dev for x86_64 objtool build Jan 13, 2026
@roxell
Copy link
Collaborator

roxell commented Jan 14, 2026

Can we change the "Closes: https://gitlab.." to github's #230

Copy link
Member

@broonie broonie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in the commit log (iadd) otherwise LGTM

Recent kernel changes (commit 59953303827e "objtool: Disassemble code
with libopcodes instead of running objdump") require libopcodes for
x86_64 builds. The kernel's objtool Makefile detects libbfd and enables
disassembly support, which then requires libopcodes at link time.

Since libbinutils (which provides libbfd) is already installed in
Dockerfile.build, the build system enables BUILD_DISAS=y but fails to
link because libopcodes (from binutils-dev) was missing for native
builds.

Add binutils-dev to the base image to provide libopcodes for all builds.
Cross-compilation scenarios continue to work via the existing
binutils-dev:${arch} handling in Dockerfile.build.

Closes: #230

Signed-off-by: Ben Copeland <ben.copeland@linaro.org>
@roxell roxell merged commit 5097886 into master Jan 16, 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.

x86_64 builds now require -lopcodes

4 participants