bfd_format format;
char ***matching;
{
+ extern const bfd_target binary_vec;
const bfd_target * const *target, *save_targ, *right_targ;
char **matching_vector = NULL;
int match_count;
not permit archives (e.g., the binary target), then we should
not allow some other target to recognize it as an archive, but
should instead allow the specified target to recognize it as an
- object. */
+ object. When I first made this change, it broke the PE target,
+ because the specified pei-i386 target did not recognize the
+ actual pe-i386 archive. Since there may be other problems of
+ this sort, I changed this test to check only for the binary
+ target. */
- if (format == bfd_archive)
+ if (format == bfd_archive && save_targ == &binary_vec)
{
abfd->xvec = save_targ;
abfd->format = bfd_unknown;
}
for (target = bfd_target_vector; *target != NULL; target++) {
- extern const bfd_target binary_vec;
const bfd_target *temp;
if (*target == &binary_vec)