This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/80628] New: gcc 7.1.0 produces duplicate entries in .debug_gnu_pubtypes table
- From: "georgerim at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 04 May 2017 13:13:48 +0000
- Subject: [Bug debug/80628] New: gcc 7.1.0 produces duplicate entries in .debug_gnu_pubtypes table
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80628
Bug ID: 80628
Summary: gcc 7.1.0 produces duplicate entries in
.debug_gnu_pubtypes table
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
Assignee: unassigned at gcc dot gnu.org
Reporter: georgerim at gmail dot com
Target Milestone: ---
Created attachment 41315
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41315&action=edit
sample object
I found this when builded LLVM llc binary using gcc 5.4.1 and -ggnu-pubnames
-gsplit-dwarf.
And also checked that latest available released version 7.1.0 is also affected.
gcc produces duplicate entries in .debug_gnu_pubtypes section, ex:
UnifyFunctionExitNodes.cpp.o has:
0x0000ac07 EXTERNAL TYPE "std::success_type<void*>"
0x0000ac07 EXTERNAL TYPE "std::success_type<void*>"
clang produces single entry for the same:
0x0000d291 EXTERNAL TYPE "std::__success_type<void *>"
This entries can be used by linker to produce .gdb_index section.
And gold currently filters such duplicates out.
Though it still looks useless and excessive to have them in output.
Object file produces by gcc 7.1.0 is attached.
Below is a demonstration of duplication.
>> strings -a UnifyFunctionExitNodes.cpp.o |grep "GCC: ("
GCC: (GNU) 7.1.0
>> objdump UnifyFunctionExitNodes.cpp.o --dwarf=pubtypes
Contents of the .debug_gnu_pubtypes section:
...
1ea15 g,type llvm::InsertValueInst
1ea15 g,type llvm::InsertValueInst
1e47f g,type llvm::SelectInst
1e47f g,type llvm::SelectInst
1de70 g,type llvm::FuncletPadInst
1de70 g,type llvm::FuncletPadInst
151bc g,type llvm::PassRegistrationListener
151bc g,type llvm::PassRegistrationListener