eliben/pyelftools — pull request #37 by vadmium (2014-05-01 13:27:50+00:00)
Title: Add ELFFile.map() method to get file offset from memory address

There are a few implementations of this floating around (e.g. _string_table() method in Issue #3). My version includes a size parameter so that we can check if a whole region is mapped, rather than just a single byte. It also raises an error for checks for multiple inconsistent mappings. Let me know if you’d rather go for a simpler version of this function without these features.