Use the input file list to determine e_flags.
I don't think you need to define this function -- you can just inline.
Target is a bit weird name. Maybe just Ret.
Update following Rui's suggestions.
Can you add a test?
Remove an extraneous space.
FileCheck doesn't distinguish 2 or more spaces from a single space, so please remove extraneous spaces between "Flags:" and 0x62.