Avoid duplicate primary names when merging identical symbol table entries.
--trace-redir=yes shows that there are duplicated redir entries e.g.
--32537--    TOPSPECS of soname NONE filename /home/philippe/valgrind/m_redir_trace/memcheck/vgpreload_memcheck-amd64-linux.so
--32537--      libc.so*                  strcasecmp_l                   R-> (2014.0) 0x04c28bf0
--32537--      libc.so*                  strcasecmp_l                   R-> (2014.0) 0x04c28bf0
--32537--      libc.so*                  __GI_strcasecmp_l              R-> (2014.0) 0x04c28b70
--32537--      libc.so*                  __GI_strcasecmp_l              R-> (2014.0) 0x04c28b70

These are caused by the merging of identical debug entries always
adding the two primary names, even if the entries are exactly the same.

This patch avoids duplicated names in debug info if the entry to merge
has only one name identical to the entry name to which we are merging.

This avoids the useless duplicated redir entries, and slightly decreases
the "dinfo" memory usage.
 


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12554 a5019735-40e9-0310-863c-91ae7b9d1cf9
1 file changed