When I build clang-16 from your object files (plus my system libraries and startup files) for powerpc64le using gold 2.40.50.20230614 I get exactly the same binary as when using gold 2.39.0.20230101. That's comparing gold from the tip of master and binutils-2_39-branch in sourceware.org/git/binutils-gdb.git. The latter does not have the commit you identify as causing a problem.
Very likely the reason why I don't see a problem is that my libz.so.1, libtinfo.so.5, libstdc++.so.6, libm.so.6, libgcc_s.so.1, libc.so.6, ld64.so.2, or startup files are different to yours. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to binutils in Ubuntu. https://bugs.launchpad.net/bugs/2023437 Title: ppc64el gold linker produces unusable clang-16 binary Status in binutils: In Progress Status in binutils package in Ubuntu: New Bug description: root@Unimatrix08-Jammy:/clang# /usr/bin/g++-12 -O3 -fstack-protector-strong -Wformat -Werror=format-security -Wno-unused-command-line-argument -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fdebug-prefix-map=/llvm-toolchain-16-16.0.5/build-llvm=build-llvm -fdebug-prefix-map=/llvm-toolchain-16-16.0.5/= -no-canonical-prefixes -ffile-prefix-map=/llvm-toolchain-16-16.0.5/build-llvm=build-llvm -ffile-prefix-map=/llvm-toolchain-16-16.0.5/= -no-canonical-prefixes -fno-common -Woverloaded-virtual -fno-strict-aliasi ng -O3 -DNDEBUG -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--build-id -fuse-ld=bfd -Wl,--gc-sections tools/clang/tools/driver/CMakeFiles/clang.dir/driver.cpp.o tools/clang/tools/driver/CMakeFiles/clang.dir/cc1_main.cpp.o tools/clang/tools/driver/CMakeFiles/clang.dir/cc1as_main.cpp.o tools/clang/tools/driver/CMakeFiles/clang.dir/cc1gen_reproducer_main.cpp.o tools/clang/tools/driver/CMakeFiles/clang.dir/clang-driver.cpp.o -o bin/clang-16-bfd -Wl,-rpath,"\$ORIGIN/../lib:" lib/libLLVMPowerPCCodeGen.a lib/libLLVMPowerPCAsmParser.a lib/libLLVMPowerPCDesc.a lib/libLLVMPowerPCDisassembler.a lib/libLLVMPowerPCInfo.a lib/libLLVMAnalysis.a lib/libLLVMCodeGen.a lib/libLLVMCore.a lib/libLLVMipo.a lib/libLLVMAggressiveInstCombine.a lib/libLLVMInstCombine.a lib/libLLVMInstrumentation.a lib/libLLVMMC.a lib/libLLVMMCParser.a lib/libLLVMObjCARCOpts.a lib/libLLVMOption.a lib/libLLVMScalarOpts.a lib/libLLVMSupport.a lib/libLLVMTargetParser.a lib/libLLVMTransformUtils.a lib/libLL VMVectorize.a lib/libclangBasic.a lib/libclangCodeGen.a lib/libclangDriver.a lib/libclangFrontend.a lib/libclangFrontendTool.a lib/libclangSerialization.a lib/libLLVMAsmPrinter.a lib/libLLVMGlobalISel.a lib/libLLVMSelectionDAG.a lib/libLLVMMCDisassembler.a lib/libclangCodeGen.a lib/libLLVMCoverage.a lib/libLLVMLTO.a lib/libLLVMExtensions.a lib/libPolly.a lib/libPollyISL.a lib/libLLVMPasses.a lib/libLLVMCodeGen.a lib/libLLVMObjCARCOpts.a lib/libLLVMTarget.a lib/libLLVMCoroutines.a lib/libLLVMipo.a lib/libLLVMInstrumentation.a lib/libLLVMVectorize.a lib/libLLVMBitWriter.a lib/libLLVMLinker.a lib/libLLVMIRPrinter.a lib/libclangExtractAPI.a lib/libclangRewriteFrontend.a lib/libclangARCMigrate.a lib/libclangStaticAnalyzerFrontend.a lib/libclangStaticAnalyzerCheckers.a lib/libclangStaticAnalyzerCore.a lib/libclangCrossTU.a lib/libclangIndex.a lib/libclangFrontend.a lib/libclangDriver.a lib/libLLVMWindowsDriver.a lib/libLLVMOption.a lib/libclangParse .a lib/libclangSerialization.a lib/libclangSema.a lib/libclangAnalysis.a lib/libclangASTMatchers.a lib/libLLVMFrontendHLSL.a lib/libclangEdit.a lib/libclangSupport.a lib/libclangAST.a lib/libLLVMFrontendOpenMP.a lib/libLLVMScalarOpts.a lib/libLLVMAggressiveInstCombine.a lib/libLLVMInstCombine.a lib/libLLVMTransformUtils.a lib/libLLVMAnalysis.a lib/libLLVMProfileData.a lib/libLLVMSymbolize.a lib/libLLVMDebugInfoDWARF.a lib/libLLVMDebugInfoPDB.a lib/libLLVMObject.a lib/libLLVMMCParser.a lib/libLLVMMC.a lib/libLLVMIRReader.a lib/libLLVMBitReader.a lib/libLLVMAsmParser.a lib/libLLVMTextAPI.a lib/libLLVMDebugInfoCodeView.a lib/libLLVMDebugInfoMSF.a lib/libLLVMCore.a lib/libLLVMBinaryFormat.a lib/libLLVMRemarks.a lib/libLLVMBitstreamReader.a lib/libclangFormat.a lib/libclangToolingInclusions.a lib/libclangToolingCore.a lib/libclangRewrite.a lib/libclangLex.a lib/libclangBasic.a lib/libLLVMTargetParser.a lib/libLLVMSupport.a lib/libLLVMDemangle.a -l rt -ldl -lm /usr/lib/powerpc64le-linux-gnu/libz.so /usr/lib/powerpc64le-linux-gnu/libtinfo.so root@Unimatrix08-Jammy:/clang# /usr/bin/g++-12 -O3 -fstack-protector-strong -Wformat -Werror=format-security -Wno-unused-command-line-argument -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fdebug-prefix-map=/llvm-toolchain-16-16.0.5/build-llvm=build-llvm -fdebug-prefix-map=/llvm-toolchain-16-16.0.5/= -no-canonical-prefixes -ffile-prefix-map=/llvm-toolchain-16-16.0.5/build-llvm=build-llvm -ffile-prefix-map=/llvm-toolchain-16-16.0.5/= -no-canonical-prefixes -fno-common -Woverloaded-virtual -fno-strict-aliasi ng -O3 -DNDEBUG -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--build-id -fuse-ld=gold -Wl,--gc-sections tools/clang/tools/driver/CMakeFiles/clang.dir/driver.cpp.o tools/clang/tools/driver/CMakeFiles/clang.dir/cc1_main.cpp.o tools/clang/tools/driver/CMakeFiles/clang.dir/cc1as_main.cpp.o tools/clang/tools/driver/CMakeFiles/clang.dir/cc1gen_reproducer_main.cpp.o tools/clang/tools/driver/CMakeFiles/clang.dir/clang-driver.cpp.o -o bin/clang-16 -Wl,-rpath,"\$ORIGIN/../lib:" lib/libLLVMPowerPCCodeGen.a lib/libLLVMPowerPCAsmParser.a lib/libLLVMPowerPCDesc.a lib/libLLVMPowerPCDisassembler.a lib/libLLVMPowerPCInfo.a lib/libLLVMAnalysis.a lib/libLLVMCodeGen.a lib/libLLVMCore.a lib/libLLVMipo.a lib/libLLVMAggressiveInstCombine.a lib/libLLVMInstCombine.a lib/libLLVMInstrumentation.a lib/libLLVMMC.a lib/libLLVMMCParser.a lib/libLLVMObjCARCOpts.a lib/libLLVMOption.a lib/libLLVMScalarOpts.a lib/libLLVMSupport.a lib/libLLVMTargetParser.a lib/libLLVMTransformUtils.a lib/libLLVMV ectorize.a lib/libclangBasic.a lib/libclangCodeGen.a lib/libclangDriver.a lib/libclangFrontend.a lib/libclangFrontendTool.a lib/libclangSerialization.a lib/libLLVMAsmPrinter.a lib/libLLVMGlobalISel.a lib/libLLVMSelectionDAG.a lib/libLLVMMCDisassembler.a lib/libclangCodeGen.a lib/libLLVMCoverage.a lib/libLLVMLTO.a lib/libLLVMExtensions.a lib/libPolly.a lib/libPollyISL.a lib/libLLVMPasses.a lib/libLLVMCodeGen.a lib/libLLVMObjCARCOpts.a lib/libLLVMTarget.a lib/libLLVMCoroutines.a lib/libLLVMipo.a lib/libLLVMInstrumentation.a lib/libLLVMVectorize.a lib/libLLVMBitWriter.a lib/libLLVMLinker.a lib/libLLVMIRPrinter.a lib/libclangExtractAPI.a lib/libclangRewriteFrontend.a lib/libclangARCMigrate.a lib/libclangStaticAnalyzerFrontend.a lib/libclangStaticAnalyzerCheckers.a lib/libclangStaticAnalyzerCore.a lib/libclangCrossTU.a lib/libclangIndex.a lib/libclangFrontend.a lib/libclangDriver.a lib/libLLVMWindowsDriver.a lib/libLLVMOption.a lib/libclangParse.a lib/libclangSerialization.a lib/libclangSema.a lib/libclangAnalysis.a lib/libclangASTMatchers.a lib/libLLVMFrontendHLSL.a lib/libclangEdit.a lib/libclangSupport.a lib/libclangAST.a lib/libLLVMFrontendOpenMP.a lib/libLLVMScalarOpts.a lib/libLLVMAggressiveInstCombine.a lib/libLLVMInstCombine.a lib/libLLVMTransformUtils.a lib/libLLVMAnalysis.a lib/libLLVMProfileData.a lib/libLLVMSymbolize.a lib/libLLVMDebugInfoDWARF.a lib/libLLVMDebugInfoPDB.a lib/libLLVMObject.a lib/libLLVMMCParser.a lib/libLLVMMC.a lib/libLLVMIRReader.a lib/libLLVMBitReader.a lib/libLLVMAsmParser.a lib/libLLVMTextAPI.a lib/libLLVMDebugInfoCodeView.a lib/libLLVMDebugInfoMSF.a lib/libLLVMCore.a lib/libLLVMBinaryFormat.a lib/libLLVMRemarks.a lib/libLLVMBitstreamReader.a lib/libclangFormat.a lib/libclangToolingInclusions.a lib/libclangToolingCore.a lib/libclangRewrite.a lib/libclangLex.a lib/libclangBasic.a lib/libLLVMTargetParser.a lib/libLLVMSupport.a lib/libLLVMDemangle.a -lrt -ldl -lm /usr/lib/powerpc64le-linux-gnu/libz.so /usr/lib/powerpc64le-linux-gnu/libtinfo.so root@Unimatrix08-Jammy:/clang# ./bin/clang-16 -v qemu: uncaught target signal 11 (Segmentation fault) - core dumped Segmentation fault (core dumped) root@Unimatrix08-Jammy:/clang# ./bin/clang-16-bfd -v Ubuntu clang version 16.0.5 Target: powerpc64le-unknown-linux-gnu Thread model: posix InstalledDir: /clang/./bin Found candidate GCC installation: /usr/lib/gcc/powerpc64le-linux-gnu/12 Selected GCC installation: /usr/lib/gcc/powerpc64le-linux-gnu/12 Candidate multilib: .;@m64 Selected multilib: .;@m64 With bfd everything works, with gold, I get a Segmentation Fault. (Ubuntu mantic development release) First broken version is 2.40-2ubuntu5 Last working version is 2.40-2ubuntu4 According to the diff only one powerpc change was added on gold linker http://launchpadlibrarian.net/664314947/binutils_2.40-2ubuntu4_2.40-2ubuntu5.diff.gz And its this one https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=0961e631575b0a1eafccf32fbde56d456aef9169 To manage notifications about this bug go to: https://bugs.launchpad.net/binutils/+bug/2023437/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp