Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/untrusted/pll_loader/pll_loader.h

Issue 1825893002: PNaCl Dynamic Linking: Added portable dependencies to shared objects. (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Bumping Feature Version Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pnacl/driver/pnacl-ld.py ('k') | src/untrusted/pll_loader/pll_loader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Native Client Authors. All rights reserved. 1 // Copyright 2016 The Native Client Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NATIVE_CLIENT_SRC_UNTRUSTED_PLL_LOADER_PLL_LOADER_H_ 5 #ifndef NATIVE_CLIENT_SRC_UNTRUSTED_PLL_LOADER_PLL_LOADER_H_
6 #define NATIVE_CLIENT_SRC_UNTRUSTED_PLL_LOADER_PLL_LOADER_H_ 1 6 #define NATIVE_CLIENT_SRC_UNTRUSTED_PLL_LOADER_PLL_LOADER_H_ 1
7 7
8 #include <string> 8 #include <string>
9 #include <unordered_set> 9 #include <unordered_set>
10 #include <vector> 10 #include <vector>
(...skipping 29 matching lines...) Expand all
40 40
41 private: 41 private:
42 const PLLRoot *root_; 42 const PLLRoot *root_;
43 }; 43 };
44 44
45 // ModuleSet represents a set of loaded PLLs. 45 // ModuleSet represents a set of loaded PLLs.
46 class ModuleSet { 46 class ModuleSet {
47 public: 47 public:
48 // Load a PLL by filename. Does not add the filename to a known set of loaded 48 // Load a PLL by filename. Does not add the filename to a known set of loaded
49 // modules, and will not de-duplicate loading modules. 49 // modules, and will not de-duplicate loading modules.
50 void AddByFilename(const char *filename); 50 // Returns a pointer to the PLL's pso_root.
51 PLLRoot *AddByFilename(const char *filename);
51 52
52 // Change the search path used by the linker when looking for PLLs by soname. 53 // Change the search path used by the linker when looking for PLLs by soname.
53 void SetSonameSearchPath(const std::vector<std::string> &dir_list); 54 void SetSonameSearchPath(const std::vector<std::string> &dir_list);
54 55
55 // Load a PLL by soname and add the soname to the set of loaded modules. 56 // Load a PLL by soname and add the soname to the set of loaded modules.
56 void AddBySoname(const char *soname); 57 // Returns a pointer to the PLL's pso_root if it is loaded, NULL otherwise.
58 PLLRoot *AddBySoname(const char *soname);
57 59
58 // Looks up a symbol in the set of modules. This does a linear search of 60 // Looks up a symbol in the set of modules. This does a linear search of
59 // the modules, in the order that they were added using AddByFilename(). 61 // the modules, in the order that they were added using AddByFilename().
60 void *GetSym(const char *name); 62 void *GetSym(const char *name);
61 63
62 // Applies relocations to the modules, resolving references between them. 64 // Applies relocations to the modules, resolving references between them.
63 void ResolveRefs(); 65 void ResolveRefs();
64 66
65 private: 67 private:
66 // The search path used to look for "sonames". 68 // The search path used to look for "sonames".
67 std::vector<std::string> search_path_; 69 std::vector<std::string> search_path_;
68 // An unordered set of "sonames" (to see if a module has been loaded). 70 // An unordered set of "sonames" (to see if a module has been loaded).
69 std::unordered_set<std::string> sonames_; 71 std::unordered_set<std::string> sonames_;
70 std::vector<PLLModule> modules_; 72 std::vector<PLLModule> modules_;
71 }; 73 };
72 74
73 #endif 75 #endif
OLDNEW
« no previous file with comments | « pnacl/driver/pnacl-ld.py ('k') | src/untrusted/pll_loader/pll_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698