equal
deleted
inserted
replaced
|
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Implementation of the Class ElfImports for the elf2e32 tool |
|
15 // @internalComponent |
|
16 // @released |
|
17 // |
|
18 // |
|
19 |
|
20 |
|
21 #if !defined(_PL_ELFIMPORTS_H_) |
|
22 #define _PL_ELFIMPORTS_H_ |
|
23 |
|
24 #include "pl_common.h" |
|
25 #include <vector> |
|
26 #include <map> |
|
27 |
|
28 using std::vector; |
|
29 using std::map; |
|
30 using std::binary_function; |
|
31 |
|
32 class ElfImportRelocation; |
|
33 |
|
34 /** |
|
35 This class get the list of symbols imported from a list of DSOs. |
|
36 @internalComponent |
|
37 @released |
|
38 */ |
|
39 class ElfImports |
|
40 { |
|
41 |
|
42 public: |
|
43 struct StringPtrLess : binary_function<const char *, const char *, bool> |
|
44 { |
|
45 bool operator() (const char * lhs, const char * rhs) const; |
|
46 }; |
|
47 |
|
48 typedef std::vector<ElfImportRelocation*> RelocationList; |
|
49 |
|
50 typedef std::map<const char*, RelocationList, StringPtrLess> ImportMap; |
|
51 |
|
52 ElfImports(); |
|
53 ~ElfImports(); |
|
54 |
|
55 void Add(const char* aDll, ElfImportRelocation *aReloc); |
|
56 PLUINT32 GetImportSize(); |
|
57 ImportMap& GetImports(); |
|
58 |
|
59 private: |
|
60 ImportMap iImports; |
|
61 |
|
62 }; |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 #endif // !defined(_PL_ELFIMPORTS_H_) |