[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commits] r21884 - in /fsf/glibc-2_16-branch/libc: ChangeLog NEWS elf/Makefile elf/dl-runtime.c elf/tst-audit8.c sysdeps/sh/dl-machine.h



Author: eglibc
Date: Wed Nov 28 00:02:36 2012
New Revision: 21884

Log:
Import glibc-2.16 for 2012-11-28

Added:
    fsf/glibc-2_16-branch/libc/elf/tst-audit8.c
Modified:
    fsf/glibc-2_16-branch/libc/ChangeLog
    fsf/glibc-2_16-branch/libc/NEWS
    fsf/glibc-2_16-branch/libc/elf/Makefile
    fsf/glibc-2_16-branch/libc/elf/dl-runtime.c
    fsf/glibc-2_16-branch/libc/sysdeps/sh/dl-machine.h

Modified: fsf/glibc-2_16-branch/libc/ChangeLog
==============================================================================
--- fsf/glibc-2_16-branch/libc/ChangeLog (original)
+++ fsf/glibc-2_16-branch/libc/ChangeLog Wed Nov 28 00:02:36 2012
@@ -1,3 +1,21 @@
+2012-11-20  Thomas Schwinge  <thomas@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/sh/dl-machine.h (ELF_MACHINE_RUNTIME_FIXUP_PARAMS): New
+	macro.
+
+2012-11-14  H.J. Lu  <hongjiu.lu@xxxxxxxxx>
+
+	[BZ #14831]
+	* elf/Makefile (tests): Add tst-audit8.
+	($(objpfx)tst-audit8): Also depend on $(common-objpfx)math/libm.so.
+	($(objpfx)tst-audit8.out): New target.
+	(tst-audit8-ENV): New variable.
+	* elf/dl-runtime.c (_dl_profile_fixup): Call _dl_fixup to skip
+	audit if l_reloc_result is NULL.
+	(ELF_MACHINE_RUNTIME_FIXUP_PARAMS): Issue an error if it isn't
+	defined and ELF_MACHINE_RUNTIME_FIXUP_ARGS is defined.
+	* elf/tst-audit8.c: New file.
+
 2012-11-07  Andreas Jaeger  <aj@xxxxxxx>
 
 	[BZ #14809]

Modified: fsf/glibc-2_16-branch/libc/NEWS
==============================================================================
--- fsf/glibc-2_16-branch/libc/NEWS (original)
+++ fsf/glibc-2_16-branch/libc/NEWS Wed Nov 28 00:02:36 2012
@@ -9,7 +9,7 @@
 
 * The following bugs are resolved with this release:
 
-  6530, 14195, 14459, 14476, 14562, 14621, 14648, 14756, 14809
+  6530, 14195, 14459, 14476, 14562, 14621, 14648, 14756, 14809, 14831
 
 Version 2.16
 

Modified: fsf/glibc-2_16-branch/libc/elf/Makefile
==============================================================================
--- fsf/glibc-2_16-branch/libc/elf/Makefile (original)
+++ fsf/glibc-2_16-branch/libc/elf/Makefile Wed Nov 28 00:02:36 2012
@@ -138,7 +138,7 @@
 	 tst-dlmodcount tst-dlopenrpath tst-deep1 \
 	 tst-dlmopen1 tst-dlmopen2 tst-dlmopen3 \
 	 unload3 unload4 unload5 unload6 unload7 unload8 tst-global1 order2 \
-	 tst-audit1 tst-audit2 \
+	 tst-audit1 tst-audit2 tst-audit8 \
 	 tst-stackguard1 tst-addr1 tst-thrlock \
 	 tst-unique1 tst-unique2 tst-unique3 tst-unique4 \
 	 tst-initorder tst-initorder2 tst-relsort1
@@ -1024,6 +1024,10 @@
 $(objpfx)tst-audit7.out: $(objpfx)tst-auditmod7b.so
 tst-audit7-ENV = LD_AUDIT=$(objpfx)tst-auditmod7b.so
 
+$(objpfx)tst-audit8: $(common-objpfx)math/libm.so
+$(objpfx)tst-audit8.out: $(objpfx)tst-auditmod1.so
+tst-audit8-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so
+
 $(objpfx)tst-global1: $(libdl)
 $(objpfx)tst-global1.out: $(objpfx)testobj6.so $(objpfx)testobj2.so
 

Modified: fsf/glibc-2_16-branch/libc/elf/dl-runtime.c
==============================================================================
--- fsf/glibc-2_16-branch/libc/elf/dl-runtime.c (original)
+++ fsf/glibc-2_16-branch/libc/elf/dl-runtime.c Wed Nov 28 00:02:36 2012
@@ -1,5 +1,5 @@
 /* On-demand PLT fixup for shared objects.
-   Copyright (C) 1995-2009, 2010, 2011 Free Software Foundation, Inc.
+   Copyright (C) 1995-2012 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
@@ -167,6 +167,26 @@
 		   ElfW(Addr) retaddr, void *regs, long int *framesizep)
 {
   void (*mcount_fct) (ElfW(Addr), ElfW(Addr)) = INTUSE(_dl_mcount);
+
+  if (l->l_reloc_result == NULL)
+    {
+      /* BZ #14843: ELF_DYNAMIC_RELOCATE is called before l_reloc_result
+	 is allocated.  We will get here if ELF_DYNAMIC_RELOCATE calls a
+	 resolver function to resolve an IRELATIVE relocation and that
+	 resolver calls a function that is not yet resolved (lazy).  For
+	 example, the resolver in x86-64 libm.so calls __get_cpu_features
+	 defined in libc.so.  Skip audit and resolve the external function
+	 in this case.  */
+      *framesizep = -1;
+      return _dl_fixup (
+# ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
+#  ifndef ELF_MACHINE_RUNTIME_FIXUP_PARAMS
+#   error Please define ELF_MACHINE_RUNTIME_FIXUP_PARAMS.
+#  endif
+			ELF_MACHINE_RUNTIME_FIXUP_PARAMS,
+# endif
+			l, reloc_arg);
+    }
 
   /* This is the address in the array where we store the result of previous
      relocations.  */

Added: fsf/glibc-2_16-branch/libc/elf/tst-audit8.c
==============================================================================
--- fsf/glibc-2_16-branch/libc/elf/tst-audit8.c (added)
+++ fsf/glibc-2_16-branch/libc/elf/tst-audit8.c Wed Nov 28 00:02:36 2012
@@ -1,0 +1,1 @@
+#include "../io/pwd.c"

Modified: fsf/glibc-2_16-branch/libc/sysdeps/sh/dl-machine.h
==============================================================================
--- fsf/glibc-2_16-branch/libc/sysdeps/sh/dl-machine.h (original)
+++ fsf/glibc-2_16-branch/libc/sysdeps/sh/dl-machine.h Wed Nov 28 00:02:36 2012
@@ -1,6 +1,5 @@
 /* Machine-dependent ELF dynamic relocation inline functions.  SH version.
-   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2011
-   Free Software Foundation, Inc.
+   Copyright (C) 1999-2012 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
@@ -116,6 +115,7 @@
 }
 
 #define ELF_MACHINE_RUNTIME_FIXUP_ARGS int plt_type
+#define ELF_MACHINE_RUNTIME_FIXUP_PARAMS plt_type
 
 /* Mask identifying addresses reserved for the user program,
    where the dynamic linker should not map anything.  */

_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits