Skip to content

Commit

Permalink
[BZ #10087]
Browse files Browse the repository at this point in the history
	* 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>.
  • Loading branch information
Ulrich Drepper committed Apr 27, 2009
1 parent 1ac03a1 commit e49dc84
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
2009-04-26 Ulrich Drepper <drepper@redhat.com>

[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>.

* nscd/connections.c (send_ro_fd): Define temporary variable to avoid
warning.

Expand Down
8 changes: 5 additions & 3 deletions elf/dl-runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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
{
Expand All @@ -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;
}
Expand Down

0 comments on commit e49dc84

Please sign in to comment.