The patch extends the getMipsEFlags function. Now in that function we iterate over all object files, parse ELF header flags and merge them. If a file is incompatible with previously analyzed ones we show an error or warning. That can happen if, for example, we try to link files with incompatible ABI, ISA, NAN encoding etc.
There is an alternative solution. We can check and merge flags and reject incompatible input modules in the isCompatible function which is called from the SymbolTable::addFile method. But in that case we have to save and keep somewhere a merged ELF flags combination to use it later in the writer.