Index: src/untrusted/pll_loader/pll_loader.h |
diff --git a/src/untrusted/pll_loader/pll_loader.h b/src/untrusted/pll_loader/pll_loader.h |
index 65577f51f7388f2abc3cc83f42b233139f181836..0cdecc352c313e24ef0485a12773d155cc6a6ce3 100644 |
--- a/src/untrusted/pll_loader/pll_loader.h |
+++ b/src/untrusted/pll_loader/pll_loader.h |
@@ -5,6 +5,8 @@ |
#ifndef NATIVE_CLIENT_SRC_UNTRUSTED_PLL_LOADER_PLL_LOADER_H_ |
#define NATIVE_CLIENT_SRC_UNTRUSTED_PLL_LOADER_PLL_LOADER_H_ 1 |
+#include <string> |
+#include <unordered_set> |
#include <vector> |
#include "native_client/src/untrusted/pll_loader/pll_root.h" |
@@ -42,9 +44,16 @@ class PLLModule { |
// ModuleSet represents a set of loaded PLLs. |
class ModuleSet { |
public: |
- // Load a PLL and add it to the set. |
+ // Load a PLL by filename. Does not add the filename to a known set of loaded |
+ // modules, and will not de-duplicate loading modules. |
void AddByFilename(const char *filename); |
+ // Change the search path used by the linker when looking for PLLs by soname. |
+ void SetSonameSearchPath(const std::vector<std::string> &dir_list); |
+ |
+ // Load a PLL by soname and add the soname to the set of loaded modules. |
+ void AddBySoname(const char *soname); |
+ |
// Looks up a symbol in the set of modules. This does a linear search of |
// the modules, in the order that they were added using AddByFilename(). |
void *GetSym(const char *name); |
@@ -53,6 +62,10 @@ class ModuleSet { |
void ResolveRefs(); |
private: |
+ // The search path used to look for "sonames". |
+ std::vector<std::string> search_path_; |
+ // An unordered set of "sonames" (to see if a module has been loaded). |
+ std::unordered_set<std::string> sonames_; |
std::vector<PLLModule> modules_; |
}; |