mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-05 15:15:42 +00:00
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.
This commit is contained in:
@@ -28,10 +28,12 @@ static bool
|
|||||||
tic4x_scan (const struct bfd_arch_info *info,
|
tic4x_scan (const struct bfd_arch_info *info,
|
||||||
const char *string)
|
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. */
|
about strange numbered machines in C3x or C4x series. */
|
||||||
if (string[0] == 't' && string[1] == 'i')
|
if (string[0] == 't' && string[1] == 'i')
|
||||||
string += 2;
|
string += 2;
|
||||||
|
else if (startswith (string, "tms320"))
|
||||||
|
string += 6;
|
||||||
if (*string == 'C' || *string == 'c')
|
if (*string == 'C' || *string == 'c')
|
||||||
string++;
|
string++;
|
||||||
if (*string == '3')
|
if (*string == '3')
|
||||||
|
|||||||
Reference in New Issue
Block a user