[binutils-gdb] Improve RISC-V LD error message
Alan Modra
amodra@sourceware.org
Tue Dec 20 01:59:00 GMT 2016
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=96b0927de3ebdb302d8d571c43da3db5ec23847e
commit 96b0927de3ebdb302d8d571c43da3db5ec23847e
Author: Palmer Dabbelt <palmer@dabbelt.com>
Date: Sun Dec 18 22:53:46 2016 -0800
Improve RISC-V LD error message
I recently ran into this error message and found it's not helpful: it
just tells me some temporary file can't be linked. This slightly
improved one at least tells me it's because of an elf32/elf64 conflict.
* elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Improve
error message when linking elf32 and elf64.
Diff:
---
bfd/ChangeLog | 5 +++++
bfd/elfnn-riscv.c | 5 +++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 36d83e9..8e0269c 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2016-12-20 Palmer Dabbelt <palmer@dabbelt.com>
+
+ * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Improve
+ error message when linking elf32 and elf64.
+
2016-12-19 Christian Groessler <chris@groessler.org>
* elf32-arm.c (elf32_arm_popcount): Rename from 'popcount'. Make
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c
index 4f11cf6..1ab97b9 100644
--- a/bfd/elfnn-riscv.c
+++ b/bfd/elfnn-riscv.c
@@ -2561,8 +2561,9 @@ _bfd_riscv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
if (strcmp (bfd_get_target (ibfd), bfd_get_target (obfd)) != 0)
{
(*_bfd_error_handler)
- (_("%B: ABI is incompatible with that of the selected emulation"),
- ibfd);
+ (_("%B: ABI is incompatible with that of the selected emulation:\n"
+ " target emulation `%s' does not match `%s'"),
+ ibfd, bfd_get_target (ibfd), bfd_get_target (obfd));
return FALSE;
}
More information about the Binutils-cvs
mailing list