From: Tom Hughes Date: Thu, 5 Jul 2012 09:42:31 +0000 (+0000) Subject: Allow an IFunc symbol to be merged with a non-IFunc symbol that X-Git-Tag: svn/VALGRIND_3_8_0~157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5b7153e372c179735774b0a3c9f6e925a0cdb1b;p=thirdparty%2Fvalgrind.git Allow an IFunc symbol to be merged with a non-IFunc symbol that represents the underlying resolver function. Fixes BZ#301204. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12711 --- diff --git a/coregrind/m_debuginfo/storage.c b/coregrind/m_debuginfo/storage.c index a5fe07f007..6773c6acf3 100644 --- a/coregrind/m_debuginfo/storage.c +++ b/coregrind/m_debuginfo/storage.c @@ -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) {