use of com.oracle.truffle.llvm.parser.coff.CoffFile.ImageDataDirectory in project graal by oracle.
the class PEFile method getImportDataReader.
private ObjectFileReader getImportDataReader() {
// First see if there is an import data directory
ImageOptionNT64Header header = getOptionHeader();
if (header != null) {
ImageDataDirectory importDirectory = header.getImportDirectory();
if (importDirectory != null) {
return coffFile.getReaderAtVirtualAddress(importDirectory.getVirtualAddress());
}
}
// Otherwise try to load it from the .idata section
ImageSectionHeader imageSection = coffFile.getSection(".idata");
if (imageSection != null) {
return coffFile.getReaderAtVirtualAddress(imageSection.virtualAddress);
}
// Finally, give up
return null;
}
Aggregations