about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-02-02 11:50:49 -0500
committerPetr Baudis <pasky@suse.cz>2011-02-04 00:53:22 +0100
commit1f636cc82bea01298514f73169aa879adafd7cdb (patch)
treebd366b07bed109840890d45e276cc42cb7d8033b
parente283e1d04c3c345dd594e03daa868e86ebf1656a (diff)
downloadglibc-1f636cc82bea01298514f73169aa879adafd7cdb.tar.gz
glibc-1f636cc82bea01298514f73169aa879adafd7cdb.tar.xz
glibc-1f636cc82bea01298514f73169aa879adafd7cdb.zip
Fix passing symbol value to pltexit callbacks when ld.so auditing.
(cherry picked from commit 8517b15ee8e39fed11afb784fd0e249d977849f4)
-rw-r--r--ChangeLog6
-rw-r--r--elf/dl-runtime.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 24506f0d07..6a57302c95 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-02-02  Ulrich Drepper  <drepper@gmail.com>
+
+	* elf/dl-runtime.c (_dl_call_pltexit): Pass correct address of the
+	function to the callback.
+	Patch partly by Jiri Olsa <jolsa@redhat.com>.
+
 2011-02-02  Andreas Schwab  <schwab@redhat.com>
 
 	* shadow/sgetspent.c: Check return value of __sgetspent_r instead
diff --git a/elf/dl-runtime.c b/elf/dl-runtime.c
index 6847edafc6..ae2d05c776 100644
--- a/elf/dl-runtime.c
+++ b/elf/dl-runtime.c
@@ -1,5 +1,5 @@
 /* On-demand PLT fixup for shared objects.
-   Copyright (C) 1995-2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 1995-2009, 2010, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -446,6 +446,7 @@ _dl_call_pltexit (struct link_map *l, ElfW(Word) reloc_arg,
 
   /* Set up the sym parameter.  */
   ElfW(Sym) sym = *defsym;
+  sym.st_value = DL_FIXUP_VALUE_ADDR (reloc_result->addr);
 
   /* Get the symbol name.  */
   const char *strtab = (const void *) D_PTR (reloc_result->bound,