[BOLT][DWARF] Fix rare problem while rewriting debug_abbrev after LTO
Summary: With LTO, it's possible for multiple DWARF compile units to share the same abbreviation section set, i.e. to have the same abbrev_offset. When units sharing the same abbrev set are located next to each other and neither of them is being processed (i.e. contain processed functions), it can trigger a bug in BOLT. When this happened, the abbrev set is considered empty. Additionally, different units may patch abbrev section differently. The fix is to not rely on the next unit offset when detecting abbreviation set boundaries and to delay writing abbrev section until all units are processed. (cherry picked from FBD31985046)
parent
172deb75
Please register or sign in to comment