]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Avoid IFUNC for static library.
authorRoland McGrath <roland@hack.frob.com>
Wed, 24 Apr 2013 20:40:47 +0000 (13:40 -0700)
committerRoland McGrath <roland@hack.frob.com>
Wed, 24 Apr 2013 20:40:47 +0000 (13:40 -0700)
sysdeps/nacl/nacl_interface_query.c

index 1bbe724637b37718ca024007ad1676282ec4ee8f..a8fcc197b630825034dde37afdb75878834c9d5f 100644 (file)
@@ -18,6 +18,8 @@
 
 #include <nacl-interfaces.h>
 
+#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