fromReader static method
DynamicTable
fromReader(
- Reader reader,
- SectionHeaderEntry entry
)
override
Implementation
static DynamicTable fromReader(Reader reader, SectionHeaderEntry entry) {
final sectionReader = reader.shrink(entry.offset, entry.size);
final entries = <int, int>{};
while (true) {
// Each entry is a tag and a value, both native word sized.
final tag = _readElfNative(sectionReader);
final value = _readElfNative(sectionReader);
// A DT_NULL entry signifies the end of entries.
if (tag == DynamicTableTag.DT_NULL.index) break;
entries[tag] = value;
}
return DynamicTable._(entry, entries, sectionReader.wordSize);
}