Skip to contentSkip to conversation

build error of rust ordered/unordered sections mismatch

DISCUSSION Wang Yugui 2 participants 2 messages Nov 8 – Nov 9 Rust

lore
Share & tools
lore

Wang Yugui

author
#0 lore raw

Hi,

When I build kernel 6.18.60 and 1.68.62(maybe more versions), a build error happended.

ld: __patchable_function_entries has both ordered [__patchable_function_entries' in rust/core.o] and unordered [__patchable_function_entries' in io_uring/fdinfo.o] sections

# rustc -V
rustc 1.92.0 (ded5c06cf 2025-12-08) (Red Hat 1.92.0-1.module+el8.10.0+40191+971f4d77)
# bindgen -V
bindgen 0.72.1
# gcc --version
gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-30)

But kernel 7.4.0-rc1 is built well on this server.

any advice please.

Best Regards
Wang Yugui ([email protected])
2026/11/09

reviewer
#1 lore raw
Quoted 16 lines · Wang Yugui

Hi,

When I build kernel 6.18.60 and 1.68.62(maybe more versions), a build error happended.

ld: __patchable_function_entries has both ordered [__patchable_function_entries' in rust/core.o] and unordered [__patchable_function_entries' in io_uring/fdinfo.o] sections

# rustc -V
rustc 1.92.0 (ded5c06cf 2025-12-08) (Red Hat 1.92.0-1.module+el8.10.0+40191+971f4d77)
# bindgen -V
bindgen 0.72.1
# gcc --version
gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-30)
Quoted 3 lines

But kernel 7.4.0-rc1 is built well on this server.

any advice please.

LLVM emits SHF_LINK_ORDER for patchable function entry section:
https://github.com/llvm/llvm-project/blob/main/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp#L5232-L5252

You can try building the full kernel with LLVM toolchain (LLVM=1) or update the binutils to 2.36.

Best,
Gary