update test reference data
authorMathieu Lacage <mathieu.lacage@cutebugs.net>
Fri, 20 Apr 2012 17:34:49 +0200
changeset 630 3bfc35cfebe2
parent 629 d7ef4732dccc
child 631 5e32178a6bb6
update test reference data
test/output/test5.ref
test/output/test6.ref
test/output/test7.ref
test/output/test8.ref
vdl-lookup.c
--- a/test/output/test5.ref	Wed Apr 18 19:43:29 2012 +0200
+++ b/test/output/test5.ref	Fri Apr 20 17:34:49 2012 +0200
@@ -9,9 +9,9 @@
 dlclose libf.so completed
 libf destructor
 libg destructor
+libh destructor
 special destructor in libh.so
 called function_g in libg
-libh destructor
 dlclose libg.so completed
 libf constructor
 dlopen libf.so completed
@@ -21,9 +21,9 @@
 libf destructor
 dlclose libf.so completed
 libg destructor
+libh destructor
 special destructor in libh.so
 called function_g in libg
-libh destructor
 dlclose libg.so completed
 leave main
 libtest5 destructor
--- a/test/output/test6.ref	Wed Apr 18 19:43:29 2012 +0200
+++ b/test/output/test6.ref	Fri Apr 20 17:34:49 2012 +0200
@@ -13,9 +13,9 @@
 dlclose libg.so completed
 libf destructor
 libg destructor
+libh destructor
 special destructor in libh.so
 called function_g in libg
-libh destructor
 dlclose libh.so completed
 leave main
 libtest6 destructor
--- a/test/output/test7.ref	Wed Apr 18 19:43:29 2012 +0200
+++ b/test/output/test7.ref	Fri Apr 20 17:34:49 2012 +0200
@@ -6,6 +6,6 @@
 leave main
 libtest7 destructor
 libg destructor
+libh destructor
 special destructor in libh.so
 called function_g in libg
-libh destructor
--- a/test/output/test8.ref	Wed Apr 18 19:43:29 2012 +0200
+++ b/test/output/test8.ref	Fri Apr 20 17:34:49 2012 +0200
@@ -6,9 +6,9 @@
 dlopen libg.so completed
 dlclose libg.so completed
 libg destructor
+libh destructor
 special destructor in libh.so
 called function_g in libg
-libh destructor
 dlclose libg.so completed
 leave main
 libtest8 destructor
--- a/vdl-lookup.c	Wed Apr 18 19:43:29 2012 +0200
+++ b/vdl-lookup.c	Fri Apr 20 17:34:49 2012 +0200
@@ -284,6 +284,7 @@
 			unsigned long from_ver_hash,
 			unsigned long in_index)
 {
+  VDL_LOG_FUNCTION("%s %s %ld %ld\n", from_ver_name?from_ver_name:"", from_ver_filename?from_ver_filename:"", from_ver_hash, in_index);
   ElfW(Half) *in_dt_versym = in->dt_versym;
   if (from_ver_name == 0 || from_ver_filename == 0)
     {
@@ -335,6 +336,7 @@
 
       // we have version information in both the 'from' and the 'in'
       // objects.
+	VDL_LOG_DEBUG("version info on both from and in %ld\n", ver_index);
       if (ver_index == 0)
 	{
 	  // this is a symbol with local scope
@@ -413,6 +415,7 @@
       }
     }
   // the versions don't match.
+  VDL_LOG_DEBUG("match fucked\n");
   return VERSION_MATCH_BAD;
 }
 
@@ -455,6 +458,7 @@
 								       index);
 	  if (version_match == VERSION_MATCH_PERFECT)
 	    {
+	      VDL_LOG_DEBUG("non-ambiguous match %d\n", version_match);
 	      // We have resolved the symbol
 	      if (item != file && file != 0)
 		{
@@ -470,10 +474,12 @@
 	    }
 	  else if (version_match == VERSION_MATCH_AMBIGUOUS)
 	    {
+	      VDL_LOG_DEBUG("ambiguous match %d\n", version_match);
 	      n_ambiguous_matches++;
 	      last_ambiguous_match = index;
 	    }
 	}
+      VDL_LOG_DEBUG("no match\n");
       VDL_LOG_ASSERT (n_ambiguous_matches <= 1, 
 		      "We found more than 1 ambiguous match to resolve the requested symbol=%s", 
 		      name);