// Detect It Easy: detection rule file
// Author: horsicq <horsicq@gmail.com>
meta("compiler", "Watcom");

function detect() {
    var nData = ELF.getSectionNumber(".data");

    var nOffset = ELF.getSectionFileOffset(nData);
    var nSize = ELF.getSectionFileSize(nData);
    if (ELF.findString(nOffset, nSize, "WATCOM") != -1) {
        bDetected = true;
    } else if (ELF.compareEP("33ed8925........598bf48d44....505651e8")) {
        sName = "Open Watcom C/C++32";
        sOptions = "2002";
        bDetected = true;
    }

    sLang = "C/C++";

    return result();
}
