[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
Mon Sep 19 10:08:25 PDT 2022
MaskRay created this revision.
MaskRay added a reviewer: compnerd.
Herald added subscribers: sunshaoce, VincentWu, StephenFan, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, arichardson, emaste.
Herald added a project: All.
MaskRay requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
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.461254.patch
Type: text/x-patch
Size: 1195 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220919/9d3f5eec/attachment.bin>
More information about the llvm-commits
mailing list