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

Unified Diff: src/untrusted/pll_loader/pll_loader_main.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/untrusted/pll_loader/pll_loader.cc ('k') | tests/pnacl_dynamic_loading/dependencies_test.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/untrusted/pll_loader/pll_loader_main.cc
diff --git a/src/untrusted/pll_loader/pll_loader_main.cc b/src/untrusted/pll_loader/pll_loader_main.cc
index 2a489bd8e6c7263d7d53bfe2a0340f8e4fd37570..a14f63df100e6d91f6fe979df0790211ff3ccc52 100644
--- a/src/untrusted/pll_loader/pll_loader_main.cc
+++ b/src/untrusted/pll_loader/pll_loader_main.cc
@@ -15,17 +15,17 @@ typedef void (*start_func_t)(int argc, char **argv, char **envp,
Elf32_auxv_t *auxv);
int main(int argc, char **argv, char **envp) {
- // The PLL format does not include module dependencies yet, so all the
- // modules must be specified on the command line.
- if (argc <= 2) {
- fprintf(stderr, "Usage: pll_loader <ELF file>...\n");
+ if (argc != 3) {
+ fprintf(stderr, "Usage: pll_loader <Directory path> <ELF file>\n");
return 1;
}
ModuleSet modset;
- for (int i = 1; i < argc; i++) {
- modset.AddByFilename(argv[i]);
- }
+ std::vector<std::string> search_path;
+ search_path.push_back(argv[1]);
+ modset.SetSonameSearchPath(search_path);
+
+ modset.AddByFilename(argv[2]);
modset.ResolveRefs();
Elf32_auxv_t auxv[2];
« no previous file with comments | « src/untrusted/pll_loader/pll_loader.cc ('k') | tests/pnacl_dynamic_loading/dependencies_test.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698