This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 1/9] Improve a LD error message when linking elf32 and elf64
- From: Palmer Dabbelt <palmer at dabbelt dot com>
- To: amodra at gmail dot com
- To: binutils at sourceware dot org
- Cc: Andrew Waterman <andrew at sifive dot com>
- Cc: Palmer Dabbelt <palmer at dabbelt dot com>
- Date: Sun, 18 Dec 2016 22:53:46 -0800
- Subject: [PATCH 1/9] Improve a LD error message when linking elf32 and elf64
- Authentication-results: sourceware.org; auth=none
- References: <20161219042711.25225-1-palmer@dabbelt.com> <20161219065354.5497-1-palmer@dabbelt.com>
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.
bfd/ChangeLog
* elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Improve
error message when linking elf32 and elf64.
---
bfd/elfnn-riscv.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c
index 4f11cf6..88d5d66 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;
}
--
2.10.2