Currently we do a linear scan of the section table to find the data for a virtual address. This is fine when address lookups are rare. However, some data structures (e.g. PE import tables) have lots of addresses to look up. We handle this by only doing one lookup for the starting address, and requiring all subsequent addresses to be in the same section, but this restriction doesn't match the Windows loader. #881 adds a workaround for one problem that arises with PE import tables. A better fix would be to do a lookup for every address in the import table, but then we start wanting to do something better than a linear scan, e.g an interval tree. This probably would need to do lazy loading of the section data, so that we don't force loading the entire file for ReadCache users.
Currently we do a linear scan of the section table to find the data for a virtual address. This is fine when address lookups are rare. However, some data structures (e.g. PE import tables) have lots of addresses to look up. We handle this by only doing one lookup for the starting address, and requiring all subsequent addresses to be in the same section, but this restriction doesn't match the Windows loader. #881 adds a workaround for one problem that arises with PE import tables. A better fix would be to do a lookup for every address in the import table, but then we start wanting to do something better than a linear scan, e.g an interval tree. This probably would need to do lazy loading of the section data, so that we don't force loading the entire file for
ReadCacheusers.