about summary refs log tree commit diff
path: root/elf/ifuncmod6.c
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2009-06-22 15:07:40 -0700
committerUlrich Drepper <drepper@redhat.com>2009-06-22 15:07:40 -0700
commit3c30afc8625c680257b91638c3d9bee01e1fe778 (patch)
tree46b73bd4a4ca129ce8818c14c83657a9d3018f02 /elf/ifuncmod6.c
parentccab6d8f73a17346862b681250de6f73a6940144 (diff)
downloadglibc-3c30afc8625c680257b91638c3d9bee01e1fe778.tar.gz
glibc-3c30afc8625c680257b91638c3d9bee01e1fe778.tar.xz
glibc-3c30afc8625c680257b91638c3d9bee01e1fe778.zip
Add more IFUNC tests.
Mostly tests around not-exported IFUNC functions, IFUNC in statically
linked binaries and PIEs, etc.
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;
+}