Index: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp =================================================================== --- source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -1389,6 +1389,16 @@ { const uint32_t sub_type = subTypeFromElfHeader(header); arch_spec.SetArchitecture (eArchTypeELF, header.e_machine, sub_type); + // SetArchitecture will only set the OS for iOS + // If there isn't a note header, the OS will be left unset + // So set it to something reasonable. + if (arch_spec.GetTriple ().getOS() == llvm::Triple::OSType::UnknownOS) + { + llvm::Triple::OSType ostype; + bool result = GetOsFromOSABI (header.e_ident[EI_OSABI], ostype); + if (result) + arch_spec.GetTriple().setOS(ostype); + } } // If there are no section headers we are done.