[PATCH] D151845: [BOLT][DWARF] Fix handling of GCed CU function

Alexander Yermolovich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 31 15:32:43 PDT 2023


ayermolo created this revision.
Herald added subscribers: treapster, hoy, modimo, wenlei.
Herald added a reviewer: rafauler.
Herald added a reviewer: Amir.
Herald added a reviewer: maksfb.
Herald added a project: All.
ayermolo requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: llvm-commits, jplehr, yota9, sstefan1.
Herald added a project: LLVM.

A CU can have only one function so CU will have low_pc/high_pc. If this funciton
is GCed by LLD low_pc will become 0x0, and BOLT can't map this to output. We
kind of were getting away with it in monolithic DWARF, but with split DWARF
there is only skeleton CU, so we end up with rnglist with header and array, but
no body. This caused LLDB to report an error.

Test Plan:


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D151845

Files:
  bolt/lib/Rewrite/DWARFRewriter.cpp
  bolt/test/X86/Inputs/dwarf5-df-cu-function-gc-helper.s
  bolt/test/X86/Inputs/dwarf5-df-cu-function-gc-main.s
  bolt/test/X86/dwarf5-df-cu-function-gc.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151845.527213.patch
Type: text/x-patch
Size: 24109 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230531/ddb78480/attachment-0001.bin>


More information about the llvm-commits mailing list