| Issue |
63296
|
| Summary |
Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi)
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
deonzhang
|
Dear Expert,
There is an issue when i run clang 12.0.1 to link so lib, i don't know how to check which file and line info to debug, the following is crash backtrace info:
[OHOS ERROR] FAILED: communication/bluetooth/libbtframework.z.so lib.unstripped/communication/bluetooth/libbtframework.z.so
[OHOS ERROR] /usr/bin/env "../../build/toolchain/gcc_solink_wrapper.py" --readelf="../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/llvm-readobj" --nm="../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/llvm-nm" --strip=../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/llvm-strip --sofile="./lib.unstripped/communication/bluetooth/libbtframework.z.so" --output="communication/bluetooth/libbtframework.z.so" --mini-debug -- ../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/clang++ -shared -Wl,--fatal-warnings -Wl,--build-id=md5 -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--as-needed -fuse-ld=lld -Wl,--icf=all -Wl,--color-diagnostics -Wl,--no-undefined -Wl,--exclude-libs=libunwind_llvm.a -Wl,--exclude-libs=libc++_static.a -Wl,--exclude-libs=libvpx_assembly_arm.a --target=riscv64-linux-ohos -Wl,--hash-style=gnu -Wl,--warn-shared-textrel -Wl,-O2 -Wl,--gc-sections -Wl,--gdb-index --sysroot=obj/third_party/musl -nostdlib -Lobj/third_party/musl/usr/lib/riscv64-linux-ohos -L../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/lib/riscv64-linux-ohos/c++ -L../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/lib/clang/12.0.1/lib/riscv64-linux-ohos -Wl,--warn-shared-textrel -o "./lib.unstripped/communication/bluetooth/libbtframework.z.so" @"communication/bluetooth/libbtframework.z.so.rsp" -Wl,-soname="libbtframework.z.so"
[OHOS ERROR] Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi)
[OHOS ERROR] LLVM ERROR: Unsupported architecture for jump tables
[OHOS ERROR] PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
[OHOS ERROR] Stack dump:
[OHOS ERROR] 0. Program arguments: /home/deon/work/code/openharmony-repo/out/unmatched/../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/ld.lld --sysroot=obj/third_party/musl --eh-frame-hdr -m elf64lriscv -shared -o ./lib.unstripped/communication/bluetooth/libbtframework.z.so -Lobj/third_party/musl/usr/lib/riscv64-linux-ohos -L../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/lib/riscv64-linux-ohos/c++ -L../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/lib/clang/12.0.1/lib/riscv64-linux-ohos -L/home/deon/work/code/openharmony-repo/prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/../lib/riscv64-linux-ohos/c++ -Lobj/third_party/musl/usr/lib --fatal-warnings --build-id=md5 -z noexecstack -z now -z relro -z defs --as-needed --icf=all --color-diagnostics --no-undefined --exclude-libs=libunwind_llvm.a --exclude-libs=libc++_static.a --exclude-libs=libvpx_assembly_arm.a --hash-style=gnu --warn-shared-textrel -O2 --gc-sections --gdb-index --warn-shared-textrel --whole-archive obj/foundation/communication/bluetooth/frameworks/inner/c_adapter/btframework/ohos_bt_adapter_utils.o obj/foundation/communication/bluetooth/frameworks/inner/c_adapter/btframework/ohos_bt_gap.o obj/foundation/communication/bluetooth/frameworks/inner/c_adapter/btframework/ohos_bt_gatt.o obj/foundation/communication/bluetooth/frameworks/inner/c_adapter/btframework/ohos_bt_gatt_client.o obj/foundation/communication/bluetooth/frameworks/inner/c_adapter/btframework/ohos_bt_gatt_server.o obj/foundation/communication/bluetooth/frameworks/inner/c_adapter/btframework/ohos_bt_spp.o obj/foundation/communication/bluetooth/frameworks/inner/src/btframework/bluetooth_ble_advertiser.o obj/foundation/communication/bluetooth/frameworks/inner/src/btframework/bluetooth_ble_central_manager.o obj/foundation/communication/bluetooth/frameworks/inner/src/btframework/bluetooth_device_class.o obj/foundation/communication/bluetooth/frameworks/inner/src/btframework/bluetooth_gatt_characteristic.o obj/foundation/communication/bluetooth/frameworks/inner/src/btframework/bluetooth_gatt_client.o obj/foundation/communication/bluetooth/frameworks/inner/src/btframework/bluetooth_gatt_descriptor.o obj/foundation/communication/bluetooth/frameworks/inner/src/btframework/bluetooth_gatt_manager.o obj/foundation/communication/bluetooth/frameworks/inner/src/btframework/bluetooth_gatt_server.o obj/foundation/communication/bluetooth/frameworks/inner/src/btframework/bluetooth_gatt_service.o obj/foundation/communication/bluetooth/frameworks/inner/src/btframework/bluetooth_host.o obj/foundation/communication/bluetooth/frameworks/inner/src/btframework/bluetooth_proxy_manager.o obj/foundation/communication/bluetooth/frameworks/inner/src/btframework/bluetooth_remote_device.o obj/foundation/communication/bluetooth/frameworks/inner/src/btframework/bluetooth_socket.o obj/foundation/communication/bluetooth/frameworks/inner/src/btframework/bluetooth_socket_inputstream.o obj/foundation/communication/bluetooth/frameworks/inner/src/btframework/bluetooth_socket_outputstream.o obj/foundation/communication/bluetooth/frameworks/inner/src/btframework/bluetooth_utils.o obj/foundation/communication/bluetooth/frameworks/inner/src/mock/btframework/bluetooth_a2dp_snk.o obj/foundation/communication/bluetooth/frameworks/inner/src/btframework/bluetooth_a2dp_src.o obj/foundation/communication/bluetooth/frameworks/inner/src/btframework/bluetooth_avrcp_ct.o obj/foundation/communication/bluetooth/frameworks/inner/src/mock/btframework/bluetooth_avrcp_tg.o obj/foundation/communication/bluetooth/frameworks/inner/src/btframework/bluetooth_hfp_ag.o obj/foundation/communication/bluetooth/frameworks/inner/src/mock/btframework/bluetooth_hfp_hf.o obj/foundation/communication/bluetooth/frameworks/inner/src/btframework/bluetooth_hid_host.o obj/foundation/communication/bluetooth/frameworks/inner/src/mock/btframework/bluetooth_map_mce.o obj/foundation/communication/bluetooth/frameworks/inner/src/mock/btframework/bluetooth_map_mse.o obj/foundation/communication/bluetooth/frameworks/inner/src/btframework/bluetooth_opp.o obj/foundation/communication/bluetooth/frameworks/inner/src/btframework/bluetooth_pan.o obj/foundation/communication/bluetooth/frameworks/inner/src/mock/btframework/bluetooth_pbap_pce.o obj/foundation/communication/bluetooth/frameworks/inner/src/mock/btframework/bluetooth_pbap_pse.o obj/foundation/communication/bluetooth/services/bluetooth/ipc/libbtipc_static.a commonlibrary/c_utils/libutils.z.so hiviewdfx/hisysevent_native/libhisysevent.z.so hiviewdfx/hilog_native/libhilog.so communication/ipc/libipc_core.z.so systemabilitymgr/samgr/libsamgr_proxy.z.so obj/foundation/communication/bluetooth/services/bluetooth/common/libbtcommon.a thirdparty/bounds_checking_function/libsec_shared.z.so obj/third_party/musl/usr/lib/riscv64-linux-ohos/libc.so obj/third_party/musl/usr/lib/riscv64-linux-ohos/libcrypt.a obj/third_party/musl/usr/lib/riscv64-linux-ohos/libdl.a obj/third_party/musl/usr/lib/riscv64-linux-ohos/libm.a obj/third_party/musl/usr/lib/riscv64-linux-ohos/libpthread.a obj/third_party/musl/usr/lib/riscv64-linux-ohos/libresolv.a obj/third_party/musl/usr/lib/riscv64-linux-ohos/librt.a obj/third_party/musl/usr/lib/riscv64-linux-ohos/libutil.a obj/third_party/musl/usr/lib/riscv64-linux-ohos/libxnet.a --no-whole-archive obj/third_party/musl/usr/lib/riscv64-linux-ohos/crti.o ../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/lib/clang/12.0.1/lib/riscv64-linux-ohos/clang_rt.crtbegin.o -lunwind ../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/lib/clang/12.0.1/lib/riscv64-linux-ohos/libclang_rt.builtins.a -lc++ -lc -lc++abi ../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/lib/riscv64-linux-ohos/c++/libc++abi.a -ldl -lm ../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/lib/clang/12.0.1/lib/riscv64-linux-ohos/libclang_rt.ubsan_minimal.so obj/third_party/musl/usr/lib/riscv64-linux-ohos/crtn.o ../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/lib/clang/12.0.1/lib/riscv64-linux-ohos/clang_rt.crtend.o -soname=libbtframework.z.so
[OHOS ERROR] 1. Running pass 'Lower type metadata' on module 'ld-temp.o'.
[OHOS ERROR] #0 0x000056481ab0f322 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/deon/work/code/openharmony-repo/out/unmatched/../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/ld.lld+0x649322)
[OHOS ERROR] #1 0x000056481ab0cf64 llvm::sys::RunSignalHandlers() (/home/deon/work/code/openharmony-repo/out/unmatched/../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/ld.lld+0x646f64)
[OHOS ERROR] #2 0x000056481ab0d0d5 SignalHandler(int) (/home/deon/work/code/openharmony-repo/out/unmatched/../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/ld.lld+0x6470d5)
[OHOS ERROR] #3 0x00007f9e79a42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
[OHOS ERROR] #4 0x00007f9e79a96a7c __pthread_kill_implementation ./nptl/./nptl/pthread_kill.c:44:76
[OHOS ERROR] #5 0x00007f9e79a96a7c __pthread_kill_internal ./nptl/./nptl/pthread_kill.c:78:10
[OHOS ERROR] #6 0x00007f9e79a96a7c pthread_kill ./nptl/./nptl/pthread_kill.c:89:10
[OHOS ERROR] #7 0x00007f9e79a42476 raise ./signal/../sysdeps/posix/raise.c:27:6
[OHOS ERROR] #8 0x00007f9e79a287f3 abort ./stdlib/./stdlib/abort.c:81:7
[OHOS ERROR] #9 0x000056481aac0449 llvm::report_fatal_error(llvm::Twine const&, bool) (/home/deon/work/code/openharmony-repo/out/unmatched/../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/ld.lld+0x5fa449)
[OHOS ERROR] #10 0x000056481aac056e (/home/deon/work/code/openharmony-repo/out/unmatched/../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/ld.lld+0x5fa56e)
[OHOS ERROR] #11 0x000056481be13fc9 (anonymous namespace)::LowerTypeTestsModule::buildBitSetsFromDisjointSet(llvm::ArrayRef<llvm::Metadata*>, llvm::ArrayRef<(anonymous namespace)::GlobalTypeMember*>, llvm::ArrayRef<(anonymous namespace)::ICallBranchFunnel*>) (/home/deon/work/code/openharmony-repo/out/unmatched/../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/ld.lld+0x194dfc9)
[OHOS ERROR] #12 0x000056481be176d5 (anonymous namespace)::LowerTypeTestsModule::lower() (/home/deon/work/code/openharmony-repo/out/unmatched/../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/ld.lld+0x19516d5)
[OHOS ERROR] #13 0x000056481be18910 (anonymous namespace)::LowerTypeTests::runOnModule(llvm::Module&) (/home/deon/work/code/openharmony-repo/out/unmatched/../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/ld.lld+0x1952910)
[OHOS ERROR] #14 0x000056481ccb8000 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/deon/work/code/openharmony-repo/out/unmatched/../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/ld.lld+0x27f2000)
[OHOS ERROR] #15 0x000056481b7c5079 llvm::lto::opt(llvm::lto::Config const&, llvm::TargetMachine*, unsigned int, llvm::Module&, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*, std::vector<unsigned char, std::allocator<unsigned char> > const&) (/home/deon/work/code/openharmony-repo/out/unmatched/../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/ld.lld+0x12ff079)
[OHOS ERROR] #16 0x000056481b7c60a2 llvm::lto::backend(llvm::lto::Config const&, std::function<std::unique_ptr<llvm::lto::NativeObjectStream, std::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)>, unsigned int, std::unique_ptr<llvm::Module, std::default_delete<llvm::Module> >, llvm::ModuleSummaryIndex&) (/home/deon/work/code/openharmony-repo/out/unmatched/../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/ld.lld+0x13000a2)
[OHOS ERROR] #17 0x000056481b7b92dc llvm::lto::LTO::runRegularLTO(std::function<std::unique_ptr<llvm::lto::NativeObjectStream, std::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)>) (/home/deon/work/code/openharmony-repo/out/unmatched/../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/ld.lld+0x12f32dc)
[OHOS ERROR] #18 0x000056481b7b983f llvm::lto::LTO::run(std::function<std::unique_ptr<llvm::lto::NativeObjectStream, std::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)>, std::function<std::function<std::unique_ptr<llvm::lto::NativeObjectStream, std::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)> (unsigned int, llvm::StringRef)>) (/home/deon/work/code/openharmony-repo/out/unmatched/../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/ld.lld+0x12f383f)
[OHOS ERROR] #19 0x000056481acc0322 lld::elf::BitcodeCompiler::compile() (/home/deon/work/code/openharmony-repo/out/unmatched/../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/ld.lld+0x7fa322)
[OHOS ERROR] #20 0x000056481ac2c8e5 void lld::elf::LinkerDriver::compileBitcodeFiles<llvm::object::ELFType<(llvm::support::endianness)1, true> >() (/home/deon/work/code/openharmony-repo/out/unmatched/../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/ld.lld+0x7668e5)
[OHOS ERROR] #21 0x000056481ac3a62c void lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::support::endianness)1, true> >(llvm::opt::InputArgList&) (/home/deon/work/code/openharmony-repo/out/unmatched/../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/ld.lld+0x77462c)
[OHOS ERROR] #22 0x000056481ac4074f lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) (/home/deon/work/code/openharmony-repo/out/unmatched/../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/ld.lld+0x77a74f)
[OHOS ERROR] #23 0x000056481ac40cf2 lld::elf::link(llvm::ArrayRef<char const*>, bool, llvm::raw_ostream&, llvm::raw_ostream&) (/home/deon/work/code/openharmony-repo/out/unmatched/../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/ld.lld+0x77acf2)
[OHOS ERROR] #24 0x000056481aaa9c45 lldMain(int, char const**, llvm::raw_ostream&, llvm::raw_ostream&, bool) (/home/deon/work/code/openharmony-repo/out/unmatched/../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/ld.lld+0x5e3c45)
[OHOS ERROR] #25 0x000056481aa36247 main (/home/deon/work/code/openharmony-repo/out/unmatched/../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/ld.lld+0x570247)
[OHOS ERROR] #26 0x00007f9e79a29d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16[OHOS ERROR] #27 0x00007f9e79a29e40 call_init ./csu/../csu/libc-start.c:128:20
[OHOS ERROR] #28 0x00007f9e79a29e40 __libc_start_main ./csu/../csu/libc-start.c:379:5
[OHOS ERROR] #29 0x000056481aaa8a55 _start (/home/deon/work/code/openharmony-repo/out/unmatched/../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/ld.lld+0x5e2a55)
[OHOS ERROR] clang-12: error: unable to execute command: Aborted (core dumped)
[OHOS ERROR] clang-12: error: linker command failed due to signal (use -v to see invocation)
Regards,
Deon
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs