RISC-V: Add i-ext as the implicit extension when e-ext is set.
The linker does not care the default versions of the extensions, since
it does not have the default ISA spec setting. Therefore, linker won't
insert the implicit extensions for the input objects. But we used to
insert the i-ext as the explicit extension, even if the e-ext is set.
This causes linker to report "cannot find default versions of the ISA
extension `i'" errors when linking the input objects with e-ext.
This patch fixes the above linker problem, and also remove the confused
riscv_ext_dont_care_version function. Unless these "dont care" extensions
are set in the input architecture explicitly, otherwise we always insert
them as the implicit ones. Afterwards, let riscv_arch_str1 surpress them
not to output to the architecture string if their versions are
RISCV_UNKNOWN_VERSION.
bfd/
* elfxx-riscv.c (riscv_ext_dont_care_version): Removed.
(riscv_parse_add_subset): Always add the implicit extensions, even if
their versions are RISCV_UNKNOWN_VERSION.
(riscv_parse_std_ext): Delay to add i-ext as the implicit extension
in the riscv_parse_add_implicit_subsets. Besides, add g-ext as the
implicit extension after it has been expanded.
(riscv_parse_add_implicit_subsets): Updated.