binfmt_flat cleanups and RISC-V support v2

From: Christoph Hellwig
Date: Thu Jun 13 2019 - 12:44:27 EST


Hi Greg,

below is a larger stash of cleanups for the binfmt_misc code,
preparing for the last patch that now trivially adds RISC-V
support, which will be used for the RISC-V nommu series I am
about to post.

Changes since v2:
- fix the handling of old format flags
- don't pass arguments on stack for RISC-V
- small cleanups for flat_v2_reloc_t