about summary refs log tree commit diff
path: root/sysdeps/generic/elf
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2009-10-30 00:48:54 -0700
committerUlrich Drepper <drepper@redhat.com>2009-10-30 00:48:54 -0700
commit31c759bf37a7a41faf8b13800deb769e8a5f3871 (patch)
treeb1e594e990e74cff74ab667cfb4a57faa790e6dd /sysdeps/generic/elf
parent51a71cf063505d689337cf998670691a0a4b2410 (diff)
downloadglibc-31c759bf37a7a41faf8b13800deb769e8a5f3871.tar.gz
glibc-31c759bf37a7a41faf8b13800deb769e8a5f3871.tar.xz
glibc-31c759bf37a7a41faf8b13800deb769e8a5f3871.zip
Uglify IFUNC tests for PPC.
Diffstat (limited to 'sysdeps/generic/elf')
-rw-r--r--sysdeps/generic/elf/ifunc-sel.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/sysdeps/generic/elf/ifunc-sel.h b/sysdeps/generic/elf/ifunc-sel.h
new file mode 100644
index 0000000000..6a27b69c5b
--- /dev/null
+++ b/sysdeps/generic/elf/ifunc-sel.h
@@ -0,0 +1,26 @@
+/* Used by the elf ifunc tests.  */
+#ifndef ELF_IFUNC_SEL_H
+#define ELF_IFUNC_SEL_H 1
+
+extern int global;
+
+static inline void *
+ifunc_sel (int (*f1) (void), int (*f2) (void), int (*f3) (void))
+{
+ switch (global)
+   {
+   case 1:
+     return f1;
+   case -1:
+     return f2;
+   default:
+     return f3;
+   }
+}
+
+static inline void *
+ifunc_one (int (*f1) (void))
+{
+  return f1;
+}
+#endif