Chromium Code Reviews| 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]; |