]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Allow an IFunc symbol to be merged with a non-IFunc symbol that
authorTom Hughes <tom@compton.nu>
Thu, 5 Jul 2012 09:42:31 +0000 (09:42 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 5 Jul 2012 09:42:31 +0000 (09:42 +0000)
represents the underlying resolver function. Fixes BZ#301204.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12711

coregrind/m_debuginfo/storage.c

index a5fe07f0075f273b747441891e399e1247f59e96..6773c6acf30d9522eafe9da10db084ab1f7d6142 100644 (file)
@@ -1369,8 +1369,7 @@ static void canonicaliseSymtab ( struct _DebugInfo* di )
          vg_assert(w < r);
          if (   di->symtab[w].addr      == di->symtab[r].addr
              && di->symtab[w].size      == di->symtab[r].size
-             && !!di->symtab[w].isText  == !!di->symtab[r].isText
-             && !!di->symtab[w].isIFunc == !!di->symtab[r].isIFunc) {
+             && !!di->symtab[w].isText  == !!di->symtab[r].isText) {
             /* merge the two into one */
             n_merged++;
             /* Add r names to w if r has secondary names 
@@ -1380,6 +1379,8 @@ static void canonicaliseSymtab ( struct _DebugInfo* di )
                                      di->symtab[w].pri_name))) {
                add_DiSym_names_to_from(di, &di->symtab[w], &di->symtab[r]);
             }
+            /* mark w as an IFunc if either w or r are */
+            di->symtab[w].isIFunc = di->symtab[w].isIFunc || di->symtab[r].isIFunc;
             /* and use ::pri_names to indicate this slot is no longer in use */
             di->symtab[r].pri_name = NULL;
             if (di->symtab[r].sec_names) {