Open nsz-arm opened 3 years ago
i spotted this in glibc code (which also uses -fgnu89-inline)
but glibc is probably not the only affected software: in gcc -fsemantic-interposition is the default.
what software relies on the gcc behavior?
software needing -fsemantic-interposition is rare. clang has always been allowing interprocedural optimizations in ELF -fpic mode.
Extended Description
consider
void foo_good(); extern inline void foo() { foo_good(); } void bar() { foo(); }
using: -fsemantic-interposition -fPIC -O2 expected: no reference to foo, only to foo_good. got: interposable call to foo.
with -O0 i expect a local call to foo that is not interposable.
(i don't think iso c requires either way, but gcc implements it the described way on elf platforms and existing software relies on it. at least on linux targets clang should follow.)