* ldfile.c (ldfile_try_open_bfd): Don't crash if we see an empty
archive.
This commit is contained in:
parent
ef7904ee59
commit
a999880517
2 changed files with 19 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2000-03-06 Ian Lance Taylor <ian@zembu.com>
|
||||||
|
|
||||||
|
* ldfile.c (ldfile_try_open_bfd): Don't crash if we see an empty
|
||||||
|
archive.
|
||||||
|
|
||||||
2000-03-02 H.J. Lu <hjl@gnu.org>
|
2000-03-02 H.J. Lu <hjl@gnu.org>
|
||||||
|
|
||||||
* emulparams/elf32mcore.sh: Include "getopt.h".
|
* emulparams/elf32mcore.sh: Include "getopt.h".
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
/* Copyright (C) 1991, 92, 93, 94, 95, 98, 99, 2000 Free Software Foundation, Inc.
|
/* Linker file opening and searching.
|
||||||
|
Copyright (C) 1991, 92, 93, 94, 95, 98, 99, 2000
|
||||||
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GLD, the Gnu Linker.
|
This file is part of GLD, the Gnu Linker.
|
||||||
|
|
||||||
|
@ -129,6 +131,8 @@ ldfile_try_open_bfd (attempt, entry)
|
||||||
else
|
else
|
||||||
check = entry->the_bfd;
|
check = entry->the_bfd;
|
||||||
|
|
||||||
|
if (check != NULL)
|
||||||
|
{
|
||||||
if (! bfd_check_format (check, bfd_object))
|
if (! bfd_check_format (check, bfd_object))
|
||||||
return true;
|
return true;
|
||||||
if (bfd_arch_get_compatible (check, output_bfd) == NULL)
|
if (bfd_arch_get_compatible (check, output_bfd) == NULL)
|
||||||
|
@ -140,6 +144,7 @@ ldfile_try_open_bfd (attempt, entry)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue