-
Notifications
You must be signed in to change notification settings - Fork 3
/
PltList.h
33 lines (26 loc) · 804 Bytes
/
PltList.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef PLT_LIST_H
#define PLT_LIST_H
#include "MemoryMappings.h"
#include <string>
using std::string;
/// @brief Stores a list of PLT ("Procedure Linkage Table") sections
class PltList
{
public:
struct Section
{
/// start of PLT section (in current process memory)
unsigned long start;
/// end of PLT section
unsigned long end;
};
/// Adds the PLT section of the binary of the specified memory mapping
/// to the internal list.
bool AddPlt (const MemoryMappings::Mapping& mapping);
/// Searches the internal for a PLT section containing the specified address.
/// Returns NULL if addr is not in any PLT section.
const Section* FindContainingPlt (const unsigned long addr) const;
private:
vector<Section> sections;
};
#endif