summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-04-27 03:01:36 +0000
committerUlrich Drepper <drepper@redhat.com>2009-04-27 03:01:36 +0000
commite49dc847d2059e96949ce9ad0b3338c7337eaec9 (patch)
tree9406258ec086951d90a2b14098e2eab7e005ac60 /elf
parent1ac03a1e44079a28f9dd55bfc80b6496618c5147 (diff)
downloadglibc-e49dc847d2059e96949ce9ad0b3338c7337eaec9.tar.gz
glibc-e49dc847d2059e96949ce9ad0b3338c7337eaec9.tar.xz
glibc-e49dc847d2059e96949ce9ad0b3338c7337eaec9.zip
[BZ #10087]
	* elf/dl-runtime.c (_dl_fixup): Use DL_FIXUP_VALUE_ADDR to access
	result of lookup to make call to implement STT_GNU_IFUNC.
	(_dl_profile_fixup): Likewise.
	Patch by H.J. Lu <hjl.tools@gmail.com>.
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-runtime.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/elf/dl-runtime.c b/elf/dl-runtime.c
index 93c8f29d39..0eb7d4e3b9 100644
--- a/elf/dl-runtime.c
+++ b/elf/dl-runtime.c
@@ -137,7 +137,7 @@ _dl_fixup (
   value = elf_machine_plt_value (l, reloc, value);
 
   if (__builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0))
-    value = ((DL_FIXUP_VALUE_TYPE (*) (void)) value) ();
+    value = ((DL_FIXUP_VALUE_TYPE (*) (void)) DL_FIXUP_VALUE_ADDR (value)) ();
 
   /* Finally, fix up the plt itself.  */
   if (__builtin_expect (GLRO(dl_bind_not), 0))
@@ -225,7 +225,8 @@ _dl_profile_fixup (
 
 	  if (__builtin_expect (ELFW(ST_TYPE) (defsym->st_info)
 				== STT_GNU_IFUNC, 0))
-	    value = ((DL_FIXUP_VALUE_TYPE (*) (void)) value) ();
+	    value = ((DL_FIXUP_VALUE_TYPE (*) (void))
+		     DL_FIXUP_VALUE_ADDR (value)) ();
 	}
       else
 	{
@@ -235,7 +236,8 @@ _dl_profile_fixup (
 
 	  if (__builtin_expect (ELFW(ST_TYPE) (refsym->st_info)
 				== STT_GNU_IFUNC, 0))
-	    value = ((DL_FIXUP_VALUE_TYPE (*) (void)) value) ();
+	    value = ((DL_FIXUP_VALUE_TYPE (*) (void))
+		     DL_FIXUP_VALUE_ADDR (value)) ();
 
 	  result = l;
 	}