def _isELF(self, m, contents=None):
        "Test whether is ELF file and optionally has certain contents"
        # Note: for provides, check for 'abi' not 'provides' because we
        # can provide the filename even if there is no provides list
        # as long as a DT_NEEDED entry has been present to set the abi
        return m and m.name == 'ELF' and self._hasContents(m, contents)