return NULL;
}
- if (abfd->target_defaulted && bfd_has_map (abfd))
+ if ((abfd->target_defaulted || abfd->is_linker_input)
+ && bfd_has_map (abfd))
{
bfd *first;
unsigned int save;
if (first != NULL)
{
first->target_defaulted = false;
+ if (abfd->is_linker_input)
+ first->plugin_format = bfd_plugin_no;
if (!bfd_check_format (first, bfd_object)
|| first->xvec != abfd->xvec)
bfd_set_error (bfd_error_wrong_object_format);
{nm "" ../ld-archive/nx.nd}} \
"abcx" \
] \
+ [list "CRIS regular archive link (implicit emulation)" \
+ "-e ff" "tmpdir/ab.a --verbose --print-map" \
+ "$asemul" {../ld-archive/abc.s} \
+ {{ld ../ld-archive/abc.vd} \
+ {nm "" ../ld-archive/abc.nd} \
+ {nm "" ../ld-archive/nx.nd}} \
+ "abci" \
+ ] \
]
# PR binutils/33485 hits with the aout archive format and with this
# test that format is used with non-aout targets, hence the reverse
"abtcx" \
] \
]
+# PR binutils/33485 hits with the aout archive format and with this
+# test that format is used with non-aout targets, hence the reverse
+# condition. Cf. the note at the top.
+if { ![istarget cris-*-*aout*] } {
+ setup_xfail "binutils/33485" "*-*-*"
+}
+run_ld_link_tests [list \
+ [list "CRIS thin archive link (implicit emulation)" \
+ "-e ff" "tmpdir/abt.a --verbose --print-map" \
+ "$asemul" {../ld-archive/abc.s} \
+ {{ld ../ld-archive/abtc.vd} \
+ {nm "" ../ld-archive/abc.nd} \
+ {nm "" ../ld-archive/nx.nd}} \
+ "abtci" \
+ ] \
+]