[PATCH] D32647: [ELF] - Do not produce duplicate values in .gdb_index's constant pool area.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 28 08:35:54 PDT 2017


On Fri, Apr 28, 2017 at 8:15 AM George Rimar via Phabricator <
reviews at reviews.llvm.org> wrote:

> grimar created this revision.
>
> I found this when builded llc binary using gcc 5.4.1 + LLD.
> gcc produces duplicate entries in .debug_gnu_pubtypes section, ex:
>

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.


>
> UnifyFunctionExitNodes.cpp.o has:
> 0x0000ac07 EXTERNAL TYPE     "std::__success_type<void*>"
> 0x0000ac07 EXTERNAL TYPE     "std::__success_type<void*>"
>
> clang produces single entry here:
> 0x0000d291 EXTERNAL TYPE     "std::__success_type<void *>"
>
> If we link output from gcc with LLD, that would produce excessive duplicate
> entries in .gdb_index constant pool area. That does not seem affect gdb
> work,
> but makes .gdb_index larger than it can be.
>
> I also checked that gold filters out such duplicates too.
>

Great - thanks for verifying, seems totally sane. Please file a bug with
GCC so they know about the duplicates in their output as well.


>
> Patch fixes the issue and also simplifies how we store CU index +
> attributes,
> previously they were stored separatelly, that doesn't make sense.
>
>
> https://reviews.llvm.org/D32647
>
> Files:
>   ELF/SyntheticSections.cpp
>   ELF/SyntheticSections.h
>   test/ELF/gdb-index-dup-types.s
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170428/e5de7ebc/attachment.html>


More information about the llvm-commits mailing list