[PATCH] D95930: [InstrProfiling] Use self-link for counter metadata

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 11:14:46 PST 2021


phosek added a comment.

In D95930#2539874 <https://reviews.llvm.org/D95930#2539874>, @MaskRay wrote:

>> We cannot link to the function because if the function gets discarded, we'll end up with and invalid link which leads to a linker error:
>
> If the text section `.text.foo` gets discarded, the `__profc_foo` section should get discarded, too.

Could it be because we discard COMDAT sections early on when reading input files, so later the `__profc_foo` section doesn't get collected by GC because it's a C identifier and considered a GC root?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95930/new/

https://reviews.llvm.org/D95930



More information about the llvm-commits mailing list