+2011-10-11 Alan Modra <amodra@gmail.com>
+
+ PR binutils/13257
+ * archive.c (_bfd_find_nested_archive, _bfd_get_elt_at_filepos): Open
+ thin archive element using container target if not defaulted.
+
2011-10-10 Nick Clifton <nickc@redhat.com>
* po/es.po: Updated Spanish translation.
_bfd_find_nested_archive (bfd *arch_bfd, const char *filename)
{
bfd *abfd;
+ const char *target;
for (abfd = arch_bfd->nested_archives;
abfd != NULL;
if (filename_cmp (filename, abfd->filename) == 0)
return abfd;
}
- abfd = bfd_openr (filename, NULL);
+ target = NULL;
+ if (!arch_bfd->target_defaulted)
+ target = arch_bfd->xvec->name;
+ abfd = bfd_openr (filename, target);
if (abfd)
{
abfd->archive_next = arch_bfd->nested_archives;
if (bfd_is_thin_archive (archive))
{
+ const char *target;
+
/* This is a proxy entry for an external file. */
if (! IS_ABSOLUTE_PATH (filename))
{
}
/* It's not an element of a nested archive;
open the external file as a bfd. */
- n_nfd = bfd_openr (filename, NULL);
+ target = NULL;
+ if (!archive->target_defaulted)
+ target = archive->xvec->name;
+ n_nfd = bfd_openr (filename, target);
if (n_nfd == NULL)
bfd_set_error (bfd_error_malformed_archive);
}