[PATCH] D134198: [ELF] Name ctx->objectFiles[0] in the EF_RISCV_FLOAT_ABI mismatch error
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 20 11:14:21 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG87792bdc38b5: [ELF] Name ctx->objectFiles[0] in the EF_RISCV_FLOAT_ABI mismatch error (authored by MaskRay).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134198/new/
https://reviews.llvm.org/D134198
Files:
lld/ELF/Arch/RISCV.cpp
lld/test/ELF/riscv-flags.s
Index: lld/test/ELF/riscv-flags.s
===================================================================
--- /dev/null
+++ lld/test/ELF/riscv-flags.s
@@ -0,0 +1,7 @@
+# REQUIRES: riscv
+
+# RUN: llvm-mc -filetype=obj -triple=riscv64 -target-abi=lp64d -mattr=+d %s -o %td.o
+# RUN: llvm-mc -filetype=obj -triple=riscv64 -target-abi=lp64f -mattr=+f %s -o %tf.o
+# RUN: not ld.lld %td.o %tf.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR -DF1=%td.o -DF2=%tf.o
+
+# ERR: error: [[F2]]: cannot link object files with different floating-point ABI from [[F1]]
Index: lld/ELF/Arch/RISCV.cpp
===================================================================
--- lld/ELF/Arch/RISCV.cpp
+++ lld/ELF/Arch/RISCV.cpp
@@ -139,8 +139,10 @@
target |= EF_RISCV_RVC;
if ((eflags & EF_RISCV_FLOAT_ABI) != (target & EF_RISCV_FLOAT_ABI))
- error(toString(f) +
- ": cannot link object files with different floating-point ABI");
+ error(
+ toString(f) +
+ ": cannot link object files with different floating-point ABI from " +
+ toString(ctx->objectFiles[0]));
if ((eflags & EF_RISCV_RVE) != (target & EF_RISCV_RVE))
error(toString(f) +
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134198.461632.patch
Type: text/x-patch
Size: 1195 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220920/dc97a5d5/attachment.bin>
More information about the llvm-commits
mailing list