summaryrefslogtreecommitdiff
path: root/elf/ifuncmod6.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/ifuncmod6.c')
-rw-r--r--elf/ifuncmod6.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/elf/ifuncmod6.c b/elf/ifuncmod6.c
new file mode 100644
index 0000000000..2e16c1d06d
--- /dev/null
+++ b/elf/ifuncmod6.c
@@ -0,0 +1,19 @@
+/* Test STT_GNU_IFUNC symbol reference in a shared library. */
+
+extern int foo (void);
+
+typedef int (*foo_p) (void);
+
+foo_p foo_ptr = foo;
+
+foo_p
+get_foo_p (void)
+{
+ return foo_ptr;
+}
+
+foo_p
+get_foo (void)
+{
+ return foo;
+}