forked from linzj/force_load_shared_library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgot_finder.h
39 lines (33 loc) · 1.02 KB
/
got_finder.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
34
35
36
37
38
39
#ifndef GOT_FINDER_H
#define GOT_FINDER_H
#include <stdint.h>
#include <unistd.h>
#include <memory>
class ptracer;
struct found_info;
class got_finder_client
{
public:
virtual ~got_finder_client ();
virtual bool found (const found_info &) = 0;
};
class got_finder
{
public:
got_finder ();
bool find (ptracer *ptracer, const char *name, pid_t tid,
got_finder_client *client);
private:
bool check_elf (unsigned long start, ptracer *ptracer, bool *is_elf32);
bool deal_with (unsigned long start, unsigned long end, ptracer *ptracer,
const char *name, got_finder_client *client);
template <class elf_header_type>
bool deal_with_elf (unsigned long start, unsigned long end, ptracer *ptracer,
const char *name, got_finder_client *client);
template <class dynamic_type>
bool fill_impl_with_dyn (unsigned long start, unsigned long end,
ptracer *ptracer);
struct got_finder_impl;
std::auto_ptr<got_finder_impl> impl_;
};
#endif /* GOT_FINDER_H */