Skip to content

[Bug] Kernel builds with x86-64-v2 but host tools (objtool, fixdep, etc.) require x86-64-v3 #610

@udosan174

Description

@udosan174

I encountered an issue when building the kernel with x86-64-v2 settings.
The kernel itself builds and runs fine, but several host tools (such as objtool, fixdep, modpost, resolve_btfids, etc.) are generated with a .note.gnu.property section that declares "ISA needed: x86-64-v3".

This causes a problem on CPUs that only support x86-64-v2:

  • The kernel image works correctly.
  • However, DKMS fails when trying to build external modules, because these host tools cannot run on v2-only hardware.

Steps to reproduce:

  1. Build the kernel with _config=config_x86-64-v2 (or equivalent -march=x86-64-v2).
  2. Inspect tools/objtool/objtool with readelf -n.
  3. The output shows ISA needed: x86-64-v3.

Build environment:

  • CPU: AMD Zen3
  • Compiler: Clang
  • LTO mode: Full LTO

Expected behavior:

  • Host tools should match the selected ISA level (v2 in this case), so that DKMS and external module builds remain functional on v2 hardware.

Actual behavior:

  • Host tools require x86-64-v3 even when the kernel is built for x86-64-v2.

Impact:

  • DKMS cannot build modules on v2-only CPUs, making kernel customization impossible in such environments.

Workaround:

  • Manually stripping the .note.gnu.property section from host tools after build resolves the issue, for example:
    strip --remove-section=.note.gnu.property ./tools/objtool/objtool
  • While this workaround allows DKMS to function, it is not a sustainable solution.

Could you please review the build flags or toolchain settings for host tools so they respect the selected ISA level?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions