Error building kernel 6.1.44 on -current with clang
by rinza from LinuxQuestions.org on (#6DP49)
Hi, I'm on -current and I've been successfully building kernel from source with patches (cacule scheduler and winesync) through clang, using the build_all_kernels.sh script from Slackware tree, for some time now. Today's update however fails with the following message:
Code:vmlinux.o: warning: objtool: .altinstr_replacement: unexpected end of section
ld.lld: error: ./arch/x86/kernel/vmlinux.lds:30: unable to move location counter backward for: .text
ld.lld: error: ./arch/x86/kernel/vmlinux.lds:199: at least one side of the expression must be absolute
ld.lld: error: ./arch/x86/kernel/vmlinux.lds:200: at least one side of the expression must be absolute
ld.lld: error: SRSO function pair won't alias
ld.lld: error: ./arch/x86/kernel/vmlinux.lds:30: unable to move location counter backward for: .text
ld.lld: error: ./arch/x86/kernel/vmlinux.lds:199: at least one side of the expression must be absolute
ld.lld: error: ./arch/x86/kernel/vmlinux.lds:200: at least one side of the expression must be absolute
ld.lld: error: SRSO function pair won't alias
ld.lld: error: ./arch/x86/kernel/vmlinux.lds:30: unable to move location counter backward for: .text
ld.lld: error: ./arch/x86/kernel/vmlinux.lds:199: at least one side of the expression must be absolute
ld.lld: error: ./arch/x86/kernel/vmlinux.lds:200: at least one side of the expression must be absolute
ld.lld: error: SRSO function pair won't aliasI'm using the following environment variables for setting clang:
Code:export CC=clang
export CXX=clang++
export LD=ld.lld
export CC_LD=ld.lld
export CXX_LD=ld.lld
export AR=llvm-ar
export NM=llvm-nm
export STRIP=llvm-strip
export OBJCOPY=llvm-objcopy
export OBJDUMP=llvm-objdump
export READELF=llvm-readelf
export RANLIB=llvm-ranlib
export HOSTCC=clang
export HOSTCXX=clang++
export HOSTAR=llvm-ar
export HOSTLD=ld.lld
export LLVM=1
export LLVM_IAS=1Any idea how to fix this one? Thanks!
Code:vmlinux.o: warning: objtool: .altinstr_replacement: unexpected end of section
ld.lld: error: ./arch/x86/kernel/vmlinux.lds:30: unable to move location counter backward for: .text
ld.lld: error: ./arch/x86/kernel/vmlinux.lds:199: at least one side of the expression must be absolute
ld.lld: error: ./arch/x86/kernel/vmlinux.lds:200: at least one side of the expression must be absolute
ld.lld: error: SRSO function pair won't alias
ld.lld: error: ./arch/x86/kernel/vmlinux.lds:30: unable to move location counter backward for: .text
ld.lld: error: ./arch/x86/kernel/vmlinux.lds:199: at least one side of the expression must be absolute
ld.lld: error: ./arch/x86/kernel/vmlinux.lds:200: at least one side of the expression must be absolute
ld.lld: error: SRSO function pair won't alias
ld.lld: error: ./arch/x86/kernel/vmlinux.lds:30: unable to move location counter backward for: .text
ld.lld: error: ./arch/x86/kernel/vmlinux.lds:199: at least one side of the expression must be absolute
ld.lld: error: ./arch/x86/kernel/vmlinux.lds:200: at least one side of the expression must be absolute
ld.lld: error: SRSO function pair won't aliasI'm using the following environment variables for setting clang:
Code:export CC=clang
export CXX=clang++
export LD=ld.lld
export CC_LD=ld.lld
export CXX_LD=ld.lld
export AR=llvm-ar
export NM=llvm-nm
export STRIP=llvm-strip
export OBJCOPY=llvm-objcopy
export OBJDUMP=llvm-objdump
export READELF=llvm-readelf
export RANLIB=llvm-ranlib
export HOSTCC=clang
export HOSTCXX=clang++
export HOSTAR=llvm-ar
export HOSTLD=ld.lld
export LLVM=1
export LLVM_IAS=1Any idea how to fix this one? Thanks!