--- libbfd-in.h | 2 +- libbfd.h | 2 +- targets.c | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) --- a/libbfd-in.h +++ b/libbfd-in.h @@ -686,7 +686,7 @@ extern const bfd_target * const *bfd_tar extern const bfd_target *bfd_default_vector[]; /* List of associated target vectors. */ -extern const bfd_target * const *bfd_associated_vector; +extern const bfd_target **bfd_associated_vector; /* Functions shared by the ECOFF and MIPS ELF backends, which have no other common header files. */ --- a/libbfd.h +++ b/libbfd.h @@ -691,7 +691,7 @@ extern const bfd_target * const *bfd_tar extern const bfd_target *bfd_default_vector[]; /* List of associated target vectors. */ -extern const bfd_target * const *bfd_associated_vector; +extern const bfd_target **bfd_associated_vector; /* Functions shared by the ECOFF and MIPS ELF backends, which have no other common header files. */ --- a/targets.c +++ b/targets.c @@ -1287,13 +1287,16 @@ const bfd_target *bfd_default_vector[] = /* bfd_associated_vector[] contains the associated target vectors used to reduce the ambiguity in bfd_check_format_matches. */ -static const bfd_target *_bfd_associated_vector[] = { +static bfd_target const *_bfd_associated_vector[] = { +#ifdef DEFAULT_VECTOR + &DEFAULT_VECTOR, +#endif #ifdef ASSOCIATED_VECS ASSOCIATED_VECS, #endif NULL }; -const bfd_target * const *bfd_associated_vector = _bfd_associated_vector; +const bfd_target **bfd_associated_vector = _bfd_associated_vector; /* When there is an ambiguous match, bfd_check_format_matches puts the names of the matching targets in an array. This variable is the maximum