https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87190
--- Comment #3 from Alexander Monakov <amonakov at gcc dot gnu.org> --- Remember that -fvisibility is not a perfect substitute to proper annotations via the visibility pragma and attributes. If you do extern void foo(void); void bar() { foo(); } then with -fvisibility=hidden, the call to foo goes via the PLT, with the corresponding speed and code size penalties on 32-bit x86 and other archs where PLT calls need some setup on caller side.