[PATCH] D108872: [IR] Refactor GlobalIFunc to inherit from GlobalObject, Remove GlobalIndirectSymbol
Itay Bookstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 13 01:10:16 PDT 2021
ibookstein added a comment.
Ugh. should clang accept situations where the resolver of an ifunc is also an ifunc? The semantics are confusing, but neither compiler diagnoses anything:
itay ~/tmp/gis> cat attr-ifunc.c
int qux() { return 44; }
int (*foo_resolver())() { return qux; }
int foo() __attribute__((ifunc("foo_resolver")));
int (*(*bar_resolver_resolver())())() { return foo_resolver; }
int (*bar_resolver())() __attribute__((ifunc("bar_resolver_resolver")));
int bar() __attribute__((ifunc("bar_resolver")));
int main() { return foo() + bar(); }
itay ~/tmp/gis> gcc attr-ifunc.c -o attr-ifunc -g ; ./attr-ifunc
itay ~/tmp/gis [SIGTTIN]> clang-14 attr-ifunc.c -o attr-ifunc -g ; ./attr-ifunc
itay ~/tmp/gis [108]>
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108872/new/
https://reviews.llvm.org/D108872
More information about the llvm-commits
mailing list