When building applications with LTO/ThinLTO, lld and llvmgold emit wrong .riscv.attributes sections due to the lack of sub-target features (codegen::getMAttrs() returns empty).
This patch adds a new plugin option mattr for lld and llvmgold, to get right module-level sub-target features for temporary ELF objects generated from llvm bitcode.
I think it is a better solution than merging func-level sub-target features like D142191.