Beispiel #1
0
 protected override void ReadDescriptor(ElfReader reader, uint descriptorLength)
 {
     if (descriptorLength > 0)
     {
         Descriptor = reader.ReadAsStream(descriptorLength);
     }
 }
        protected override void ReadDescriptor(ElfReader reader, uint descriptorLength)
        {
            NativeGnuNoteOS nativeGnuNote;

            if (!reader.TryReadInteger((int)descriptorLength, out nativeGnuNote))
            {
                reader.Diagnostics.Error(DiagnosticId.ELF_ERR_IncompleNoteGnuAbiTag, $"The {nameof(ElfGnuNoteABITag)} is incomplete in size. Expecting: {GetDescriptorSize()} but got {descriptorLength}");
            }

            OSKind          = (ElfGnuNoteOSKind)reader.Decode(nativeGnuNote.OS);
            MajorVersion    = reader.Decode(nativeGnuNote.MajorVersion);
            MinorVersion    = reader.Decode(nativeGnuNote.MinorVersion);
            SubMinorVersion = reader.Decode(nativeGnuNote.SubMinorVersion);
        }
Beispiel #3
0
 protected override void Read(ElfReader reader)
 {
     Stream   = reader.ReadAsStream(Size);
     SizeKind = ValueKind.Manual;
 }
 protected override void Read(ElfReader reader)
 {
     throw new NotSupportedException($"An {nameof(ElfAlignedShadowSection)} does not support read and is only used for writing");
 }
Beispiel #5
0
 protected override void Read(ElfReader reader)
 {
 }
 protected override void Read(ElfReader reader)
 {
     // This is not read by this instance but by ElfReader directly
 }
 protected override void Read(ElfReader reader)
 {
     Stream = reader.ReadAsStream(Size);
 }