* Remove BFD_FAIL in cpu-sh.c
@ 2023-06-01 0:28 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2023-06-01 0:28 UTC (permalink / raw)
To: binutils
The assertions in cpu-sh.c can be triggered by passing bogus values
in disassemble_info.mach. This doesn't cause any bfd misbehaviour.
* cpu-sh.c (sh_get_arch_from_bfd_mach): Remove BFD_FAIL.
(sh_get_arch_up_from_bfd_mach): Likewise.
diff --git a/bfd/cpu-sh.c b/bfd/cpu-sh.c
index afea21a8dac..578ff086c3f 100644
--- a/bfd/cpu-sh.c
+++ b/bfd/cpu-sh.c
@@ -117,9 +117,6 @@ sh_get_arch_from_bfd_mach (unsigned long mach)
else
i++;
- /* Machine not found. */
- BFD_FAIL();
-
return SH_ARCH_UNKNOWN_ARCH;
}
@@ -139,9 +136,6 @@ sh_get_arch_up_from_bfd_mach (unsigned long mach)
else
i++;
- /* Machine not found. */
- BFD_FAIL();
-
return SH_ARCH_UNKNOWN_ARCH;
}
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-06-01 0:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-01 0:28 Remove BFD_FAIL in cpu-sh.c Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).