[binutils-gdb] tic4x_scan: match printable arch string
Alan Modra
amodra@sourceware.org
Thu Oct 30 23:33:46 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9760f7d5058e10c6571beffeea84f88c2a2fcef6
commit 9760f7d5058e10c6571beffeea84f88c2a2fcef6
Author: Alan Modra <amodra@gmail.com>
Date: Fri Oct 31 09:38:00 2025 +1030
tic4x_scan: match printable arch string
Fix odd behaviour of objcopy -I -B on tic4x, where the tms320c4x
string reported by objcopy --info isn't a valid arch string.
* cpu-tic4x.c (tic4x_scan): Match arch string reported by
objcopy --info.
Diff:
---
bfd/cpu-tic4x.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/bfd/cpu-tic4x.c b/bfd/cpu-tic4x.c
index e154b8fa3f0..88f0e857062 100644
--- a/bfd/cpu-tic4x.c
+++ b/bfd/cpu-tic4x.c
@@ -28,10 +28,12 @@ static bool
tic4x_scan (const struct bfd_arch_info *info,
const char *string)
{
- /* Allow strings of form [ti][Cc][34], let's not be too picky
+ /* Allow strings of form (tms320|ti|)[Cc][34], let's not be too picky
about strange numbered machines in C3x or C4x series. */
if (string[0] == 't' && string[1] == 'i')
string += 2;
+ else if (startswith (string, "tms320"))
+ string += 6;
if (*string == 'C' || *string == 'c')
string++;
if (*string == '3')
More information about the Binutils-cvs
mailing list