[PR ld/22269] arm: Avoid dynamic relocs for undefweak symbols in static PIE
[deliverable/binutils-gdb.git] / bfd / format.c
index e53955eb45878dda7a1303bd421084490ba4ca2e..a80a175b8ae90b9c377a9f0bd5a3d578c1d36ec0 100644 (file)
@@ -325,12 +325,6 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
       if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
        goto err_ret;
 
-      /* If _bfd_check_format neglects to set bfd_error, assume
-        bfd_error_wrong_format.  We didn't used to even pay any
-        attention to bfd_error, so I suspect that some
-        _bfd_check_format might have this problem.  */
-      bfd_set_error (bfd_error_wrong_format);
-
       temp = BFD_SEND_FMT (abfd, _bfd_check_format, (abfd));
       if (temp)
        {
@@ -389,8 +383,6 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
                goto err_ret;
            }
        }
-      else if (bfd_get_error () != bfd_error_wrong_format)
-       goto err_ret;
     }
 
   if (best_count == 1)
This page took 0.025421 seconds and 4 git commands to generate.