aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/generic/ifunc-sel.h
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2012-03-19 21:04:21 +0100
committerAndreas Jaeger <aj@suse.de>2012-03-19 21:04:21 +0100
commitc93ba106176a8b03a5c25f7d6fbb50524a9530cf (patch)
tree0c50c8452e4a3630d4935acab35e77b91b924124 /sysdeps/generic/ifunc-sel.h
parent735095ae9566b2b14e8210e5ed44b3d5b51495f1 (diff)
downloadglibc-c93ba106176a8b03a5c25f7d6fbb50524a9530cf.zip
glibc-c93ba106176a8b03a5c25f7d6fbb50524a9530cf.tar.gz
glibc-c93ba106176a8b03a5c25f7d6fbb50524a9530cf.tar.bz2
Move sysdeps/generic/elf/* to sysdeps/generic
Diffstat (limited to 'sysdeps/generic/ifunc-sel.h')
-rw-r--r--sysdeps/generic/ifunc-sel.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/sysdeps/generic/ifunc-sel.h b/sysdeps/generic/ifunc-sel.h
new file mode 100644
index 0000000..6a27b69
--- /dev/null
+++ b/sysdeps/generic/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