This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch hjl/ifunc/environ created. glibc-2.16-ports-merge-819-g9f57598


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, hjl/ifunc/environ has been created
        at  9f5759852d43f092099be7b06da7f173332c7739 (commit)

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9f5759852d43f092099be7b06da7f173332c7739

commit 9f5759852d43f092099be7b06da7f173332c7739
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Dec 3 15:21:25 2012 -0800

    Pass __environ to x86 IFUNC function

diff --git a/ChangeLog.environ b/ChangeLog.environ
new file mode 100644
index 0000000..1dd392f
--- /dev/null
+++ b/ChangeLog.environ
@@ -0,0 +1,11 @@
+2012-12-03  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* sysdeps/i386/dl-irel.h (elf_ifunc_invoke): Pass __environ
+	to the IFUNC function.
+	* sysdeps/i386/dl-machine.h (elf_machine_rel): Likewise.
+	(elf_machine_rela): Likewise.
+	(elf_machine_lazy_rel): Likewise.
+	(elf_machine_lazy_rela): Likewise.
+	* sysdeps/x86_64/dl-irel.h (elf_ifunc_invoke): Likewise.
+	* sysdeps/x86_64/dl-machine.h (elf_machine_rela): Likewise.
+	(elf_machine_lazy_rel): Likewise.
diff --git a/sysdeps/i386/dl-irel.h b/sysdeps/i386/dl-irel.h
index 2ebddfc..3520808 100644
--- a/sysdeps/i386/dl-irel.h
+++ b/sysdeps/i386/dl-irel.h
@@ -29,7 +29,7 @@ static inline Elf32_Addr
 __attribute ((always_inline))
 elf_ifunc_invoke (Elf32_Addr addr)
 {
-  return ((Elf32_Addr (*) (void)) (addr)) ();
+  return ((Elf32_Addr (*) (char **)) (addr)) (__environ);
 }
 
 static inline void
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
index 33847f0..9b969d3 100644
--- a/sysdeps/i386/dl-machine.h
+++ b/sysdeps/i386/dl-machine.h
@@ -344,7 +344,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
 			       0)
 	  && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)
 	  && __builtin_expect (!skip_ifunc, 1))
-	value = ((Elf32_Addr (*) (void)) value) ();
+	value = ((Elf32_Addr (*) (char **)) value) (__environ);
 
       switch (r_type)
 	{
@@ -468,7 +468,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
 	  break;
 	case R_386_IRELATIVE:
 	  value = map->l_addr + *reloc_addr;
-	  value = ((Elf32_Addr (*) (void)) value) ();
+	  value = ((Elf32_Addr (*) (char **)) (value)) (__environ);
 	  *reloc_addr = value;
 	  break;
 	default:
@@ -503,7 +503,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
 	  && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)
 	  && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)
 	  && __builtin_expect (!skip_ifunc, 1))
-	value = ((Elf32_Addr (*) (void)) value) ();
+	value = ((Elf32_Addr (*) (char **)) value) (__environ);
 
       switch (ELF32_R_TYPE (reloc->r_info))
 	{
@@ -612,7 +612,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
 #  endif /* !RESOLVE_CONFLICT_FIND_MAP */
 	case R_386_IRELATIVE:
 	  value = map->l_addr + reloc->r_addend;
-	  value = ((Elf32_Addr (*) (void)) value) ();
+	  value = ((Elf32_Addr (*) (char **)) (value)) (__environ);
 	  *reloc_addr = value;
 	  break;
 	default:
@@ -714,7 +714,7 @@ elf_machine_lazy_rel (struct link_map *map,
     {
       Elf32_Addr value = map->l_addr + *reloc_addr;
       if (__builtin_expect (!skip_ifunc, 1))
-	value = ((Elf32_Addr (*) (void)) value) ();
+	value = ((Elf32_Addr (*) (char **)) value) (__environ);
       *reloc_addr = value;
     }
   else
@@ -745,7 +745,7 @@ elf_machine_lazy_rela (struct link_map *map,
     {
       Elf32_Addr value = map->l_addr + reloc->r_addend;
       if (__builtin_expect (!skip_ifunc, 1))
-	value = ((Elf32_Addr (*) (void)) value) ();
+	value = ((Elf32_Addr (*) (char **)) value) (__environ);
       *reloc_addr = value;
     }
   else
diff --git a/sysdeps/x86_64/dl-irel.h b/sysdeps/x86_64/dl-irel.h
index 830f5db..50ddd4b 100644
--- a/sysdeps/x86_64/dl-irel.h
+++ b/sysdeps/x86_64/dl-irel.h
@@ -29,7 +29,7 @@ static inline ElfW(Addr)
 __attribute ((always_inline))
 elf_ifunc_invoke (ElfW(Addr) addr)
 {
-  return ((ElfW(Addr) (*) (void)) (addr)) ();
+  return ((ElfW(Addr) (*) (char **)) (addr)) (__environ);
 }
 
 static inline void
diff --git a/sysdeps/x86_64/dl-machine.h b/sysdeps/x86_64/dl-machine.h
index d2654aa..da1b856 100644
--- a/sysdeps/x86_64/dl-machine.h
+++ b/sysdeps/x86_64/dl-machine.h
@@ -282,7 +282,7 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
 			       0)
 	  && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)
 	  && __builtin_expect (!skip_ifunc, 1))
-	value = ((ElfW(Addr) (*) (void)) value) ();
+	value = ((ElfW(Addr) (*) (char **)) value) (__environ);
 
       switch (r_type)
 	{
@@ -446,7 +446,7 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
 #  endif
 	case R_X86_64_IRELATIVE:
 	  value = map->l_addr + reloc->r_addend;
-	  value = ((ElfW(Addr) (*) (void)) value) ();
+	  value = ((ElfW(Addr) (*) (char **)) value) (__environ);
 	  *reloc_addr = value;
 	  break;
 	default:
@@ -508,7 +508,7 @@ elf_machine_lazy_rel (struct link_map *map,
     {
       ElfW(Addr) value = map->l_addr + reloc->r_addend;
       if (__builtin_expect (!skip_ifunc, 1))
-	value = ((ElfW(Addr) (*) (void)) value) ();
+	value = ((ElfW(Addr) (*) (char **)) value) (__environ);
       *reloc_addr = value;
     }
   else

-----------------------------------------------------------------------


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]