* cache.c (bfd_open_file): Set bfd_error_system_call on failure
to open file. (bfd_cache_lookup_worker): Remove check that file pos is in unsigned long range. Print system error before aborting.
This commit is contained in:
parent
ee4ced6a5c
commit
5c91cdfb25
|
@ -1,3 +1,10 @@
|
||||||
|
2005-10-26 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* cache.c (bfd_open_file): Set bfd_error_system_call on failure
|
||||||
|
to open file.
|
||||||
|
(bfd_cache_lookup_worker): Remove check that file pos is in
|
||||||
|
unsigned long range. Print system error before aborting.
|
||||||
|
|
||||||
2005-10-25 Arnold Metselaar <arnold.metselaar@planet.nl>
|
2005-10-25 Arnold Metselaar <arnold.metselaar@planet.nl>
|
||||||
|
|
||||||
* Makefile.am: Add rules for coff-z80 and cpu-z80.
|
* Makefile.am: Add rules for coff-z80 and cpu-z80.
|
||||||
|
|
23
bfd/cache.c
23
bfd/cache.c
|
@ -447,7 +447,9 @@ bfd_open_file (bfd *abfd)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (abfd->iostream != NULL)
|
if (abfd->iostream == NULL)
|
||||||
|
bfd_set_error (bfd_error_system_call);
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (! bfd_cache_init (abfd))
|
if (! bfd_cache_init (abfd))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -489,14 +491,17 @@ bfd_cache_lookup_worker (bfd *abfd)
|
||||||
snip (abfd);
|
snip (abfd);
|
||||||
insert (abfd);
|
insert (abfd);
|
||||||
}
|
}
|
||||||
}
|
return (FILE *) abfd->iostream;
|
||||||
else
|
|
||||||
{
|
|
||||||
if (bfd_open_file (abfd) == NULL
|
|
||||||
|| abfd->where != (unsigned long) abfd->where
|
|
||||||
|| real_fseek ((FILE *) abfd->iostream, abfd->where, SEEK_SET) != 0)
|
|
||||||
abort ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (FILE *) abfd->iostream;
|
if (bfd_open_file (abfd) == NULL)
|
||||||
|
;
|
||||||
|
else if (real_fseek ((FILE *) abfd->iostream, abfd->where, SEEK_SET) != 0)
|
||||||
|
bfd_set_error (bfd_error_system_call);
|
||||||
|
else
|
||||||
|
return (FILE *) abfd->iostream;
|
||||||
|
|
||||||
|
bfd_perror ("Cannot continue");
|
||||||
|
abort ();
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue