llvm-project/bolt/lib/Core
Alexander Yermolovich 9f3f9d19c7 [BOLT][DWARF] Handle shared abbrev section
We can have a scenario where multiple CUs share an abbrev table.
We modify or don't modify one CU, which leads to other CUs having invalid abbrev section.
Example that caused it.
All of CUs shared the same abbrev table. First CU just had compile_unit and sub_program.
It was not modified. Next CU had DW_TAG_lexical_block with
DW_AT_low_pc/DW_AT_high_pc converted to DW_AT_low_pc/DW_AT_ranges.
We used unmodified abbrev section for first and subsequent CUs.
So when parsing subsequent CUs debug info was corrupted.

In this patch we will now duplicate all sections that are modified and are different.
This also means that if .debug_types is present and it shares Abbrev table, and
they usually are, we now can have two Abbrev tables. One for CU that was modified,
and unmodified one for TU.

Reviewed By: maksfb

Differential Revision: https://reviews.llvm.org/D118517
2022-01-31 11:10:23 -08:00
..
BinaryBasicBlock.cpp [BOLT][NFC] Fix file-description comments 2021-12-21 10:21:41 -08:00
BinaryContext.cpp [BOLT][NFC] Move Offset annotation to Group 1 2022-01-18 13:24:50 -08:00
BinaryData.cpp [BOLT][NFC] Fix file-description comments 2021-12-21 10:21:41 -08:00
BinaryEmitter.cpp [BOLT][NFC] Move Offset annotation to Group 1 2022-01-18 13:24:50 -08:00
BinaryFunction.cpp [BOLT][NFC] Reduce includes with include-what-you-use 2022-01-21 12:05:47 -08:00
BinaryFunctionProfile.cpp [BOLT][NFC] Fix file-description comments 2021-12-21 10:21:41 -08:00
BinarySection.cpp [BOLT][NFC] Fix file-description comments 2021-12-21 10:21:41 -08:00
CMakeLists.txt Fix shared build 2021-11-15 20:01:48 -08:00
DebugData.cpp [BOLT][DWARF] Handle shared abbrev section 2022-01-31 11:10:23 -08:00
DynoStats.cpp [BOLT][NFC] Fix file-description comments 2021-12-21 10:21:41 -08:00
Exceptions.cpp [BOLT][NFC] Fix file-description comments 2021-12-21 10:21:41 -08:00
JumpTable.cpp [BOLT][NFC] Reduce includes with include-what-you-use 2022-01-21 12:05:47 -08:00
MCPlusBuilder.cpp [BOLT] Fix AARCH64 registers aliasing 2022-01-28 01:24:35 +03:00
ParallelUtilities.cpp [BOLT][NFC] Fix file-description comments 2021-12-21 10:21:41 -08:00
Relocation.cpp [BOLT][NFC] Fix file-description comments 2021-12-21 10:21:41 -08:00