[PATCH] D25456: [InstrProf] Add support for dead_strip+live_support functionality

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 29 18:44:18 PDT 2021


thakis added a comment.

In D25456#2788418 <https://reviews.llvm.org/D25456#2788418>, @MaskRay wrote:

> I've made ELF GC work in https://reviews.llvm.org/D97585 and am trying D103372 <https://reviews.llvm.org/D103372> which will make (to a large extent) Windows GC work.
>
> My question is whether S_ATTR_LIVE_SUPPORT suppresses N_NO_DEAD_STRIP on Darwin.

I thought I read somewhere that ld64 happens to ignore it…oh it was right here on this review: https://reviews.llvm.org/D25456#566954

lld doesn't ignore it in my implementation as that seems more semantically correct: Mach-O has a hierarchy of segment->section->"subsection" where the latter is associated with a symbol. N_NO_DEAD_STRIP is set on a symbol, so it feels like it's a more local concept that should win over the more global S_ATTR_LIVE_SUPPORT.

> `l___profd_foo` has N_NO_DEAD_STRIP (due to `llvm.used`) while its section has S_ATTR_LIVE_SUPPORT. Is N_NO_DEAD_STRIP ignored in this case?
> If not the GC doesn't kick in.

If we want l___profd_foo to be stripped, maybe we shouldn't mark it N_NO_DEAD_STRIP then?

> @thakis may be interested in this for the ld64.lld -dead_strip implementation (D103324 <https://reviews.llvm.org/D103324>).




Repository:
  rL LLVM

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

https://reviews.llvm.org/D25456



More information about the llvm-commits mailing list