Improve RISC-V LD error message
authorPalmer Dabbelt <palmer@dabbelt.com>
Mon, 19 Dec 2016 06:53:46 +0000 (22:53 -0800)
committerAlan Modra <amodra@gmail.com>
Tue, 20 Dec 2016 01:56:22 +0000 (12:26 +1030)
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.

bfd/ChangeLog
bfd/elfnn-riscv.c

index 36d83e9554c7ba0e70ed5424e4d93825947da4fe..8e0269c9a97bedfe12526ce94f47931d3e0f8ea3 100644 (file)
@@ -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
index 4f11cf6516fdf42a1e2e60d1994ede5242e6664c..1ab97b9b725b412a349aa528b0b696117a0848eb 100644 (file)
@@ -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;
     }
 
This page took 0.029714 seconds and 4 git commands to generate.