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(); }
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)); } }
protected ElfSection(Elf.SectionHeaderTableEntry sectionHeader, string name) { SectionHeader = sectionHeader; Name = name; }
public ElfStrtab(Elf.SectionHeaderTableEntry section, string name) : base(section, name) { }