Beispiel #1
0
        public override int Read(FileStream stream)
        {
            relocations.Empty();

            int              bytesRead = base.Read(stream);
            uint             offset    = 0;
            RelocationAddend currRelocation;

            while (offset < bytesRead)
            {
                currRelocation = new RelocationAddend();

                currRelocation.Offset = (byte *)ByteConverter.ToUInt32(data, offset + 0);
                currRelocation.Info   = ByteConverter.ToUInt32(data, offset + 4);
                currRelocation.Addend = (short)ByteConverter.ToUInt16(data, offset + 8);

                relocations.Add(currRelocation);

                offset += header.EntrySize;
            }

            return(relocations.Count);
        }
Beispiel #2
0
        public override int Read(FileStream stream)
        {
            relocations.Empty();

            int bytesRead = base.Read(stream);
            uint offset = 0;
            RelocationAddend currRelocation;
            while (offset < bytesRead)
            {
                currRelocation = new RelocationAddend();

                currRelocation.Offset = (byte*)ByteConverter.ToUInt32(data, offset + 0);
                currRelocation.Info = ByteConverter.ToUInt32(data, offset + 4);
                currRelocation.Addend = (short)ByteConverter.ToUInt16(data, offset + 8);

                relocations.Add(currRelocation);

                offset += header.EntrySize;
            }

            return relocations.Count;
        }