summary refs log tree commit diff
path: root/elf/ifuncmain3.c
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2009-11-06 09:30:56 -0800
committerUlrich Drepper <drepper@redhat.com>2009-11-06 09:30:56 -0800
commit8608ae1f7ba31f2149f9620a1339020339eac00d (patch)
treef5e43d7d064da86a766fa86e4d5133cb4460d360 /elf/ifuncmain3.c
parent5b55d23611e939340d658f42212c474c8188053e (diff)
downloadglibc-8608ae1f7ba31f2149f9620a1339020339eac00d.tar.gz
glibc-8608ae1f7ba31f2149f9620a1339020339eac00d.tar.xz
glibc-8608ae1f7ba31f2149f9620a1339020339eac00d.zip
Properly handle STT_GNU_IFUNC symbols in do_sym.
do_sym should use DL_FIXUP_VALUE_XXX macros to call IFUNC function.
Otherwise, it won't compile on ia64. This patch fixes it and adds
a test.
Diffstat (limited to 'elf/ifuncmain3.c')
-rw-r--r--elf/ifuncmain3.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/elf/ifuncmain3.c b/elf/ifuncmain3.c
index 5d067cced9..1574dd5cbe 100644
--- a/elf/ifuncmain3.c
+++ b/elf/ifuncmain3.c
@@ -46,6 +46,15 @@ main (void)
       return 1;
     }
 
+  p = dlsym (h, "foo");
+  if (p == NULL)
+    {
+      printf ("symbol not found: %s\n", dlerror ());
+      return 1;
+    }
+  if ((*p) () != -1)
+    abort ();
+
   f = dlsym (h, "get_foo_p");
   if (f == NULL)
     {