bfd, sparc: avoid duplicated error messages on invalid relocations.
authorJose E. Marchesi <jose.marchesi@oracle.com>
Tue, 4 Sep 2018 18:19:06 +0000 (20:19 +0200)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Tue, 4 Sep 2018 18:31:41 +0000 (20:31 +0200)
This patch avoids a duplicated error message when an invalid
relocation number is read from an object file in sparc-* ELF targets:

$ strip -g test.o
strip: test.o: unsupported relocation type 0xd7
strip: test.o: unsupported relocation type 0xd7
strip: test.o: bad value

Tested in x86_64-linux-gnu, sparc64-linux-gnu and sparc-linux-gnu
targets.

bfd/ChangeLog:

2018-09-04  Jose E. Marchesi  <jose.marchesi@oracle.com>

* elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Do not issue an
error when an invalid relocation is passed;  this is already done
by `_bfd_sparc_elf_info_to_howto_ptr'.

bfd/ChangeLog
bfd/elfxx-sparc.c

index 22837e0f0e856f98f09454b908dcc29070d89507..bc1cb15a8f99462dc03f7d2fa63f76e2393eee97 100644 (file)
@@ -1,3 +1,9 @@
+2018-09-04  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+       * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Do not issue an
+       error when an invalid relocation is passed;  this is already done
+       by `_bfd_sparc_elf_info_to_howto_ptr'.
+
 2018-09-04  Jose E. Marchesi  <jose.marchesi@oracle.com>
 
        * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Issue an
index 81812afc5a41cedfab9ff98d68f26aaf1e082e64..bf143c400f443221877bdeabb7aa9db52c8f05a1 100644 (file)
@@ -658,8 +658,6 @@ _bfd_sparc_elf_info_to_howto (bfd *abfd, arelent *cache_ptr,
 
   if ((cache_ptr->howto = _bfd_sparc_elf_info_to_howto_ptr (abfd, r_type)) == NULL)
     {
-      _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
-                         abfd, r_type);
       bfd_set_error (bfd_error_bad_value);
       return FALSE;
     }
This page took 0.028268 seconds and 4 git commands to generate.