Blob Blame History Raw
diff -up ./ltrace-elf.c~ ./ltrace-elf.c
--- ./ltrace-elf.c~	2012-05-03 20:29:37.414364106 +0200
+++ ./ltrace-elf.c	2012-05-03 20:49:56.502391925 +0200
@@ -676,8 +676,9 @@ read_elf(Process *proc, GElf_Addr *entry
 
 	memset(lte, 0, sizeof(*lte));
 	library_symbols = NULL;
-	library_num = 0;
 	proc->libdl_hooked = 0;
+	extern size_t cmdline_library_num;
+	library_num = cmdline_library_num;
 
 	if (do_init_elf(lte, proc->filename))
 		return NULL;
diff -up ./options.c~ ./options.c
--- ./options.c~	2012-05-03 20:29:37.438364106 +0200
+++ ./options.c	2012-05-03 20:49:42.863391613 +0200
@@ -38,6 +38,7 @@ struct options_t options = {
 
 char *library[MAX_LIBRARIES];
 size_t library_num = 0;
+size_t cmdline_library_num = 0;
 static char *progname;		/* Program name (`ltrace') */
 int opt_i = 0;			/* instruction pointer */
 int opt_r = 0;			/* print relative timestamp */
@@ -323,6 +324,7 @@ process_options(int argc, char **argv) {
 				exit(1);
 			}
 			library[library_num++] = optarg;
+			cmdline_library_num = library_num;
 			break;
 		case 'L':
 			options.libcalls = 0;
diff -up ./testsuite/ltrace.main/main-vfork.exp~ ./testsuite/ltrace.main/main-vfork.exp
--- ./testsuite/ltrace.main/main-vfork.exp~	2012-05-03 20:29:37.398364104 +0200
+++ ./testsuite/ltrace.main/main-vfork.exp	2012-05-03 20:52:13.999395063 +0200
@@ -19,7 +19,7 @@ if { [ltrace_compile_shlib $libsrc $lib_
 }
 
 # set options for ltrace.
-ltrace_options "-l" "$lib_sl" "-f"
+ltrace_options "-f"
 
 # Run PUT for ltarce.
 set exec_output [ltrace_runtest $objdir/$subdir $objdir/$subdir/$binfile]