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

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: Use file basename as dependency, not absolute / relative path. Created 4 years, 9 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
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..706b61e6410043b270418c6f537263afacfc860f 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.AddBySoname(argv[2]);
Mark Seaborn 2016/03/30 23:24:57 Can you make this one AddByFilename() rather than
Sean Klein 2016/04/01 23:12:24 Done.
modset.ResolveRefs();
Elf32_auxv_t auxv[2];

Powered by Google App Engine
This is Rietveld 408576698