<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Apr 28, 2017 at 8:15 AM George Rimar via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">grimar created this revision.<br>
<br>
I found this when builded llc binary using gcc 5.4.1 + LLD.<br>
gcc produces duplicate entries in .debug_gnu_pubtypes section, ex:<br></blockquote><div><br>oh... GCC does this, not Clang? Right, I think I remember seeing that once when trying to assess why Clang's debug info was so much smaller, etc. But when you mentioned it yesterday I thought maybe you were describing Clang's output & figured we'd need to fix LLVM there.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
UnifyFunctionExitNodes.cpp.o has:<br>
0x0000ac07 EXTERNAL TYPE     "std::__success_type<void*>"<br>
0x0000ac07 EXTERNAL TYPE     "std::__success_type<void*>"<br>
<br>
clang produces single entry here:<br>
0x0000d291 EXTERNAL TYPE     "std::__success_type<void *>"<br>
<br>
If we link output from gcc with LLD, that would produce excessive duplicate<br>
entries in .gdb_index constant pool area. That does not seem affect gdb work,<br>
but makes .gdb_index larger than it can be.<br>
<br>
I also checked that gold filters out such duplicates too.<br></blockquote><div><br>Great - thanks for verifying, seems totally sane. Please file a bug with GCC so they know about the duplicates in their output as well.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Patch fixes the issue and also simplifies how we store CU index + attributes,<br>
previously they were stored separatelly, that doesn't make sense.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D32647" rel="noreferrer" target="_blank">https://reviews.llvm.org/D32647</a><br>
<br>
Files:<br>
  ELF/SyntheticSections.cpp<br>
  ELF/SyntheticSections.h<br>
  test/ELF/gdb-index-dup-types.s<br>
<br>
</blockquote></div></div>