From: Roland McGrath Date: Wed, 24 Apr 2013 20:40:47 +0000 (-0700) Subject: Avoid IFUNC for static library. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=761e819446606d559579dc83c355fc9ee86669fe;p=thirdparty%2Fglibc.git Avoid IFUNC for static library. --- diff --git a/sysdeps/nacl/nacl_interface_query.c b/sysdeps/nacl/nacl_interface_query.c index 1bbe724637b..a8fcc197b63 100644 --- a/sysdeps/nacl/nacl_interface_query.c +++ b/sysdeps/nacl/nacl_interface_query.c @@ -18,6 +18,8 @@ #include +#ifdef SHARED + /* We can define this trivially using IFUNC rather than a wrapper because we absolutely require that we get the IRT interface query function pointer via AT_SYSINFO. */ @@ -31,3 +33,16 @@ nacl_interface_query_ifunc (void) return &__nacl_irt_query; } asm (".type nacl_interface_query, %gnu_indirect_function"); + +#else + +/* In the static library, using IFUNC is just extra overhead. */ + +size_t +nacl_interface_query (const char *interface_ident, + void *table, size_t tablesize) +{ + return __nacl_irt_query (interface_ident, table, tablesize); +} + +#endif