From 761e819446606d559579dc83c355fc9ee86669fe Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 24 Apr 2013 13:40:47 -0700 Subject: [PATCH] Avoid IFUNC for static library. --- sysdeps/nacl/nacl_interface_query.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 -- 2.47.2