https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119766
Bug ID: 119766 Summary: -gsplit-dwarf and -fdebug-types-section leads to multiple .debug_info.dwo sections Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: simon.marchi at polymtl dot ca Target Milestone: --- Using the test file: --- #include <vector> int main() { std::vector<int> foo; foo.push_back(3); return foo[0]; } --- Compiling it with: $ g++ test.cpp -gsplit-dwarf -fdebug-types-section -g3 leads to many .debug_info.dwo sections: $ readelf -S a-test.dwo | grep debug_info | wc -l 49 Each type and compile unit is placed in its own section. We would expect to see a single section with all units concatenated. This is what clang produces: $ clang++ test.cpp -gsplit-dwarf -fdebug-types-section -g3 readelf -S a-test.dwo | grep debug_info | wc -l 1 That single section contains 19 units.