public override bool CanLoad(AnELF elf)
        {
            Log.Debug($"Checking if {elf.FilePath} is a Release DSO");

            xapp = null;
            ulong format_tag = 0;

            if (elf.HasSymbol(FormatTag))
            {
                format_tag = elf.GetUInt64(FormatTag);
            }

            XamarinAppReleaseDSO_Version?reader = null;

            switch (format_tag)
            {
            case 0:
            case FormatTag_V1:
                format_tag = 1;
                reader     = new XamarinAppReleaseDSO_V1(ManagedResolver, elf);
                break;

            default:
                Log.Error($"{elf.FilePath} format ({format_tag}) is not supported by this version of TMT");
                return(false);
            }

            if (reader == null || !reader.CanLoad(elf))
            {
                return(false);
            }

            xapp = reader;
            return(true);
        }
예제 #2
0
        protected bool HasSymbol(AnELF elf, string symbolName)
        {
            bool ret = elf.HasSymbol(symbolName);

            if (!ret)
            {
                Log.Debug($"{elf.FilePath} is missing symbol '{symbolName}'");
            }
            return(ret);
        }