2001-06-24 H.J. Lu <hjl@gnu.org>
* cpu-i960.c (scan_960_mach): Don't modify const char *. Use strncasecmp/strcasecmp instead of strncmp/strcmp.
This commit is contained in:
parent
cb90e81a8b
commit
6cbac8b9dd
2 changed files with 8 additions and 7 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2001-06-24 H.J. Lu <hjl@gnu.org>
|
||||||
|
|
||||||
|
* cpu-i960.c (scan_960_mach): Don't modify const char *. Use
|
||||||
|
strncasecmp/strcasecmp instead of strncmp/strcmp.
|
||||||
|
|
||||||
2001-06-23 H.J. Lu <hjl@gnu.org>
|
2001-06-23 H.J. Lu <hjl@gnu.org>
|
||||||
|
|
||||||
* elf32-i386.c (elf_i386_relocate_section): Check the
|
* elf32-i386.c (elf_i386_relocate_section): Check the
|
||||||
|
|
|
@ -33,14 +33,10 @@ scan_960_mach (ap, string)
|
||||||
const char *string;
|
const char *string;
|
||||||
{
|
{
|
||||||
unsigned long machine;
|
unsigned long machine;
|
||||||
int i;
|
|
||||||
int fail_because_not_80960 = false;
|
int fail_because_not_80960 = false;
|
||||||
|
|
||||||
for (i = 0; i < strlen (string); i ++)
|
|
||||||
string[i] = tolower (string[i]);
|
|
||||||
|
|
||||||
/* Look for the string i960 at the front of the string. */
|
/* Look for the string i960 at the front of the string. */
|
||||||
if (strncmp ("i960", string, 4) == 0)
|
if (strncasecmp ("i960", string, 4) == 0)
|
||||||
{
|
{
|
||||||
string += 4;
|
string += 4;
|
||||||
|
|
||||||
|
@ -74,9 +70,9 @@ scan_960_mach (ap, string)
|
||||||
if (string[0] == 'c' && string[1] == 'o' && string[2] == 'r' &&
|
if (string[0] == 'c' && string[1] == 'o' && string[2] == 'r' &&
|
||||||
string[3] == 'e' && string[4] == '\0')
|
string[3] == 'e' && string[4] == '\0')
|
||||||
machine = bfd_mach_i960_core;
|
machine = bfd_mach_i960_core;
|
||||||
else if (strcmp (string, "ka_sa") == 0)
|
else if (strcasecmp (string, "ka_sa") == 0)
|
||||||
machine = bfd_mach_i960_ka_sa;
|
machine = bfd_mach_i960_ka_sa;
|
||||||
else if (strcmp (string, "kb_sb") == 0)
|
else if (strcasecmp (string, "kb_sb") == 0)
|
||||||
machine = bfd_mach_i960_kb_sb;
|
machine = bfd_mach_i960_kb_sb;
|
||||||
else if (string[1] == '\0' || string[2] != '\0') /* rest are 2-char. */
|
else if (string[1] == '\0' || string[2] != '\0') /* rest are 2-char. */
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue