[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MIPS elf64 selection bug
From: |
Carl van Schaik |
Subject: |
MIPS elf64 selection bug |
Date: |
Tue, 29 Oct 2002 13:09:13 +1100 (EST) |
There is a bug in the gas code that tests if 64-bit elf is supported.
Still present in the latest CVS
in file:
gas/config/tc-mips.c
function:
static int support_64bit_objects(void)
should be:
---------------
static int support_64bit_objects(void)
{
const char **list, **l;
int res;
list = bfd_target_list ();
for (l = list; *l != NULL; l++)
#ifdef TE_TMIPS
/* This is traditional mips */
if (strcmp (*l, "elf64-tradbigmips") == 0
|| strcmp (*l, "elf64-tradlittlemips") == 0)
#else
if (strcmp (*l, "elf64-bigmips") == 0
|| strcmp (*l, "elf64-littlemips") == 0)
#endif
break;
res = (*l != NULL);
free (list);
return res;
}
------------------
The problem was that the original
return (*l != NULL) after the free(list) failed in some cases, returning
NULL
The solution is trivial
regards
Carl van Schaik
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- MIPS elf64 selection bug,
Carl van Schaik <=