Exemplo n.º 1
0
        public ElfSymtab(Elf.SectionHeaderTableEntry section, string name)
            : base(section, name)
        {
            uint nrEntries = section.FileImageSize / section.EntrySize;

            _symbols = new ElfSymbol[nrEntries];
            var er = new EndianBinaryReader(new MemoryStream(section.SectionData), Endianness.LittleEndian);

            for (int i = 0; i < nrEntries; i++)
            {
                _symbols[i] = new ElfSymbol(er);
            }
            er.Close();
        }
Exemplo n.º 2
0
        public static ElfSection CreateInstance(Elf.SectionHeaderTableEntry section, string name)
        {
            switch (section.SectionType)
            {
            case Elf.SectionHeaderTableEntry.ElfSectionType.Strtab:
                return(new ElfStrtab(section, name));

            case Elf.SectionHeaderTableEntry.ElfSectionType.Symtab:
                return(new ElfSymtab(section, name));

            default:
                return(new ElfSection(section, name));
            }
        }
Exemplo n.º 3
0
 protected ElfSection(Elf.SectionHeaderTableEntry sectionHeader, string name)
 {
     SectionHeader = sectionHeader;
     Name          = name;
 }
Exemplo n.º 4
0
 public ElfStrtab(Elf.SectionHeaderTableEntry section, string name)
     : base(section, name)
 {
 }