fromReader static method

Section fromReader(
  1. Reader reader,
  2. SectionHeaderEntry entry
)

Implementation

static Section fromReader(Reader reader, SectionHeaderEntry entry) {
  switch (entry.type) {
    case SectionHeaderEntry._SHT_STRTAB:
      return StringTable.fromReader(reader, entry);
    case SectionHeaderEntry._SHT_SYMTAB:
      return SymbolTable.fromReader(reader, entry);
    case SectionHeaderEntry._SHT_DYNSYM:
      return SymbolTable.fromReader(reader, entry);
    case SectionHeaderEntry._SHT_NOTE:
      return Note.fromReader(reader, entry);
    case SectionHeaderEntry._SHT_DYNAMIC:
      return DynamicTable.fromReader(reader, entry);
    default:
      return Section._(entry);
  }
}