-
Notifications
You must be signed in to change notification settings - Fork 951
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fileformat: Delayed imports in PE are no longer considered when calcu…
…lating imphash (#287) Calculation of imphash is also postponed until all imports are loaded. This is related to #285.
- Loading branch information
Showing
21 changed files
with
276 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** | ||
* @file include/retdec/fileformat/types/import_table/pe_import.h | ||
* @brief Class for one PE import. | ||
* @copyright (c) 2017 Avast Software, licensed under the MIT license | ||
*/ | ||
|
||
#ifndef RETDEC_FILEFORMAT_TYPES_IMPORT_TABLE_PE_IMPORT_H | ||
#define RETDEC_FILEFORMAT_TYPES_IMPORT_TABLE_PE_IMPORT_H | ||
|
||
#include "retdec/fileformat/types/import_table/import.h" | ||
|
||
namespace retdec { | ||
namespace fileformat { | ||
|
||
enum PeImportFlag : std::uint32_t | ||
{ | ||
None = 0, | ||
Delayed = 1, | ||
}; | ||
|
||
/** | ||
* One import | ||
*/ | ||
class PeImport : public Import | ||
{ | ||
private: | ||
std::uint32_t flags; | ||
public: | ||
PeImport(std::uint32_t flags); | ||
~PeImport(); | ||
|
||
/// @name Getters | ||
/// @{ | ||
bool isDelayed() const; | ||
/// @} | ||
|
||
/// @name Setters | ||
/// @{ | ||
void setDelayed(bool importDelayed); | ||
/// @} | ||
|
||
/// @name Other methods | ||
/// @{ | ||
virtual bool isUsedForImphash() const override; | ||
/// @} | ||
}; | ||
|
||
} // namespace fileformat | ||
} // namespace retdec | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.