In this file we only have to handle the v2 ABI, so what we need to do
is to just make sure that all object files have v2 or unspecified version
Other then the 1 comment this LGTM.
I think we should still emit 2 separate error messages:
Maybe I am misunderstanding exactly what the eflags can be used for but I thought they can specify features/extensions as well as the abi versions. Right now only bits 0 and 1 are used to specify the abi, so if bit 1 is set we recognize that the user is giving us abi 1 input which isn't supported and let the user know exactly what the problem is.
If any bits above 1 are set we don't know if they are supposed to represent a new abi flag, a new feature flag or if the input is corrupted, and in that case a message like "Unrecognized feature flags: " + Twine (Flags & ~3) is likely to be more helpful.