projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
daily update
[deliverable/binutils-gdb.git]
/
bfd
/
archive.c
diff --git
a/bfd/archive.c
b/bfd/archive.c
index 0c35ff5fc7c56bd599f6b580c85d04dcedf0c58b..d7ac214c7246bf179916d3fce8811d0b065fc5e4 100644
(file)
--- a/
bfd/archive.c
+++ b/
bfd/archive.c
@@
-603,8
+603,6
@@
bfd_generic_archive_p (abfd)
char armag[SARMAG + 1];
bfd_size_type amt;
char armag[SARMAG + 1];
bfd_size_type amt;
- tdata_hold = abfd->tdata.aout_ar_data;
-
if (bfd_bread ((PTR) armag, (bfd_size_type) SARMAG, abfd) != SARMAG)
{
if (bfd_get_error () != bfd_error_system_call)
if (bfd_bread ((PTR) armag, (bfd_size_type) SARMAG, abfd) != SARMAG)
{
if (bfd_get_error () != bfd_error_system_call)
@@
-621,13
+619,15
@@
bfd_generic_archive_p (abfd)
return 0;
#endif
return 0;
#endif
- /* We are setting bfd_ardata(abfd) here, but since bfd_ardata
- involves a cast, we can't do it as the left operand of assignment. */
- amt = sizeof (struct artdata);
- abfd->tdata.aout_ar_data = (struct artdata *) bfd_zalloc (abfd, amt);
+ tdata_hold = bfd_ardata (abfd);
+ amt = sizeof (struct artdata);
+ bfd_ardata (abfd) = (struct artdata *) bfd_zalloc (abfd, amt);
if (bfd_ardata (abfd) == NULL)
if (bfd_ardata (abfd) == NULL)
- return NULL;
+ {
+ bfd_ardata (abfd) = tdata_hold;
+ return NULL;
+ }
bfd_ardata (abfd)->first_file_filepos = SARMAG;
bfd_ardata (abfd)->cache = NULL;
bfd_ardata (abfd)->first_file_filepos = SARMAG;
bfd_ardata (abfd)->cache = NULL;
@@
-636,21
+636,13
@@
bfd_generic_archive_p (abfd)
bfd_ardata (abfd)->extended_names = NULL;
bfd_ardata (abfd)->tdata = NULL;
bfd_ardata (abfd)->extended_names = NULL;
bfd_ardata (abfd)->tdata = NULL;
- if (!BFD_SEND (abfd, _bfd_slurp_armap, (abfd)))
+ if (!BFD_SEND (abfd, _bfd_slurp_armap, (abfd))
+ || !BFD_SEND (abfd, _bfd_slurp_extended_name_table, (abfd)))
{
{
- bfd_release (abfd, bfd_ardata (abfd));
- abfd->tdata.aout_ar_data = tdata_hold;
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
- return NULL;
- }
-
- if (!BFD_SEND (abfd, _bfd_slurp_extended_name_table, (abfd)))
- {
bfd_release (abfd, bfd_ardata (abfd));
bfd_release (abfd, bfd_ardata (abfd));
- abfd->tdata.aout_ar_data = tdata_hold;
- if (bfd_get_error () != bfd_error_system_call)
- bfd_set_error (bfd_error_wrong_format);
+ bfd_ardata (abfd) = tdata_hold;
return NULL;
}
return NULL;
}
@@
-686,9
+678,9
@@
bfd_generic_archive_p (abfd)
release bfd_ardata. FIXME. */
(void) bfd_close (first);
bfd_release (abfd, bfd_ardata (abfd));
release bfd_ardata. FIXME. */
(void) bfd_close (first);
bfd_release (abfd, bfd_ardata (abfd));
- abfd->tdata.aout_ar_data = tdata_hold;
#endif
bfd_set_error (bfd_error_wrong_object_format);
#endif
bfd_set_error (bfd_error_wrong_object_format);
+ bfd_ardata (abfd) = tdata_hold;
return NULL;
}
/* And we ought to close `first' here too. */
return NULL;
}
/* And we ought to close `first' here too. */
This page took
0.025562 seconds
and
4
git commands to generate.