Open
binutils: x86_64 构建启用 aarch64-linux 目标,修复 strip/objcopy 无法识别 aarch64 ELF 文件 #468
binutils: x86_64 构建启用 aarch64-linux 目标,修复 strip/objcopy 无法识别 aarch64 ELF 文件 #468
Open
huijing_zhangAdd on 7 days ago
Total: 1 files changed+11-1
@@ -2,7 +2,7 @@
2Summary: A GNU collection of binary utilities2Summary: A GNU collection of binary utilities
3Name: binutils%{?_with_debug:-debug}3Name: binutils%{?_with_debug:-debug}
4Version: 2.414Version: 2.41
5-Release: 305+Release: 31
6License: GPL-3.0-or-later AND (GPL-3.0-or-later WITH Bison-exception-2.2) AND (LGPL-2.0-or-later WITH GCC-exception-2.0) AND BSD-3-Clause AND GFDL-1.3-or-later AND GPL-2.0-or-later AND LGPL-2.1-or-later AND LGPL-2.0-or-later6License: GPL-3.0-or-later AND (GPL-3.0-or-later WITH Bison-exception-2.2) AND (LGPL-2.0-or-later WITH GCC-exception-2.0) AND BSD-3-Clause AND GFDL-1.3-or-later AND GPL-2.0-or-later AND LGPL-2.1-or-later AND LGPL-2.0-or-later
7URL: https://sourceware.org/binutils7URL: https://sourceware.org/binutils
8 8 
@@ -896,6 +896,12 @@ run_target_configuration()
896 ppc64le*)896 ppc64le*)
897 TARGS="--enable-targets=powerpc-linux,x86_64-pep"897 TARGS="--enable-targets=powerpc-linux,x86_64-pep"
898 ;;898 ;;
899+ x86_64*)
900+ # Enable the aarch64 target so that tools like strip and objcopy
901+ # can handle aarch64 ELF files (e.g. kernel livepatch modules built
902+ # for aarch64) on x86_64 hosts. See issue #206.
903+ TARGS="--enable-targets=x86_64-pep,bpf-unknown-none,aarch64-linux"
904+ ;;
899 *)905 *)
900 TARGS="--enable-targets=x86_64-pep,bpf-unknown-none"906 TARGS="--enable-targets=x86_64-pep,bpf-unknown-none"
901 ;;907 ;;
@@ -1465,6 +1471,10 @@ exit 0
1465 1471 
1466#----------------------------------------------------------------------------1472#----------------------------------------------------------------------------
1467%changelog1473%changelog
1474+* Mon Nov 16 2026 huijing_zhang <zhanghuijing@kylinos.cn> - 2.41-31
1475+- binutils: enable aarch64-linux target in x86_64 builds so that strip and
1476+ objcopy can process aarch64 ELF objects (issue #206)
1477+ 
1468* Thu Apr 09 2026 Peng Fan <fanpeng@loongson.cn> - 2.41-301478* Thu Apr 09 2026 Peng Fan <fanpeng@loongson.cn> - 2.41-30
1469- LoongArch: sync fix from upstream1479- LoongArch: sync fix from upstream
1470 1480