MaskRay wrote: > Oh, hmm, I see. > > Maybe the right strategy here is to delay attaching the resolver to the ifunc > until the end of the translation unit, when we know the definition is already > emitted. That way, it should already have the right attributes. (We already > do some delayed checking on aliases/ifuncs anyway, in checkAliasedGlobal().)
@efriedma-quic I've tried your suggestion: move `setResolver` to `checkAliasedGlobal`. However, I've run into some difficulty. When `EmitGlobal(foo)` is called, how to mark `resolver` as eagerly emitted? (Otherwise, `resolver` would not be emitted at all.) ```c int foo(int) __attribute__ ((ifunc("resolver"))); static void *resolver(void) { return 0; } // MustBeEmitted(Global) return false ``` https://github.com/llvm/llvm-project/pull/96400 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits