コード例 #1
0
        public BssHunk ParseBss(Action <Hunk> fn)
        {
            var hunk = new BssHunk();

            fn(hunk);
            var num_longs = this.read_long();

            if (num_longs < 0)
            {
                throw new BadImageFormatException(string.Format("{0} has invalid size.", hunk.HunkType));
            }
            // read in hunk data
            var size = num_longs * 4;

            hunk.size = size & ~Hunk.HUNKF_ALL;
            var flags = size & Hunk.HUNKF_ALL;

            hunk.memf = this.SetMemoryFlags(flags, 30);
            return(hunk);
        }
コード例 #2
0
ファイル: HunkFileParser.cs プロジェクト: killbug2004/reko
 public BssHunk ParseBss(Action<Hunk> fn)
 {
     var hunk = new BssHunk();
     fn(hunk);
     var num_longs = this.read_long();
     if (num_longs < 0)
         throw new BadImageFormatException(string.Format("{0} has invalid size.", hunk.HunkType));
     // read in hunk data
     var size = num_longs * 4;
     hunk.size = size & ~Hunk.HUNKF_ALL;
     var flags = size & Hunk.HUNKF_ALL;
     hunk.memf = this.SetMemoryFlags(flags, 30);
     return hunk;
 }