[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r25048 - in /fsf/trunk/libc: ./ sysdeps/s390/ sysdeps/unix/sysv/linux/powerpc/
- To: commits@xxxxxxxxxx
- Subject: [Commits] r25048 - in /fsf/trunk/libc: ./ sysdeps/s390/ sysdeps/unix/sysv/linux/powerpc/
- From: eglibc@xxxxxxxxxx
- Date: Fri, 17 Jan 2014 08:01:54 -0000
Author: eglibc
Date: Fri Jan 17 00:01:53 2014
New Revision: 25048
Log:
Import glibc-mainline for 2014-01-17
Added:
fsf/trunk/libc/sysdeps/s390/sotruss-lib.c
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/NEWS
fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/time.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Jan 17 00:01:53 2014
@@ -1,3 +1,15 @@
+2014-01-16 Mike Frysinger <vapier@xxxxxxxxxx>
+
+ * sysdeps/s390/sotruss-lib.c: New file.
+
+2014-01-16 Adhemerval Zanella <azanella@xxxxxxxxxxxxxxxxxx>
+
+ [BZ#16430]
+ * sysdeps/unix/sysv/linux/powerpc/gettimeofday.c
+ (__GI___gettimeofday): Alias for a different internal symbol to avoid
+ local calls issues by not having a PLT stub required for IFUNC calls.
+ * sysdeps/unix/sysv/linux/powerpc/time.c (__GI_time): Likewise.
+
2014-01-16 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* math/test-fpucw-ieee.c: Use <> in #include of test-fpucw.c.
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Fri Jan 17 00:01:53 2014
@@ -25,7 +25,7 @@
16151, 16153, 16167, 16172, 16195, 16214, 16245, 16271, 16274, 16283,
16289, 16293, 16314, 16316, 16330, 16337, 16338, 16356, 16365, 16366,
16369, 16372, 16375, 16379, 16384, 16385, 16386, 16387, 16390, 16394,
- 16400, 16407, 16408, 16414, 16453.
+ 16400, 16407, 16408, 16414, 16430, 16453.
* Slovenian translations for glibc messages have been contributed by the
Translation Project's Slovenian team of translators.
Added: fsf/trunk/libc/sysdeps/s390/sotruss-lib.c
==============================================================================
--- fsf/trunk/libc/sysdeps/s390/sotruss-lib.c (added)
+++ fsf/trunk/libc/sysdeps/s390/sotruss-lib.c Fri Jan 17 00:01:53 2014
@@ -1,0 +1,62 @@
+/* Override generic sotruss-lib.c to define actual functions for s390.
+ Copyright (C) 2012-2014 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define HAVE_ARCH_PLTENTER
+#define HAVE_ARCH_PLTEXIT
+
+#include <elf/sotruss-lib.c>
+
+#if __ELF_NATIVE_CLASS == 32
+# define la_s390_gnu_pltenter la_s390_32_gnu_pltenter
+# define la_s390_gnu_pltexit la_s390_32_gnu_pltexit
+# define La_s390_regs La_s390_32_regs
+# define La_s390_retval La_s390_32_retval
+#else
+# define la_s390_gnu_pltenter la_s390_64_gnu_pltenter
+# define la_s390_gnu_pltexit la_s390_64_gnu_pltexit
+# define La_s390_regs La_s390_64_regs
+# define La_s390_retval La_s390_64_retval
+#endif
+
+ElfW(Addr)
+la_s390_gnu_pltenter (ElfW(Sym) *sym,
+ unsigned int ndx __attribute__ ((unused)),
+ uintptr_t *refcook, uintptr_t *defcook,
+ La_s390_regs *regs, unsigned int *flags,
+ const char *symname, long int *framesizep)
+{
+ print_enter (refcook, defcook, symname,
+ regs->lr_r2, regs->lr_r3, regs->lr_r4, *flags);
+
+ /* No need to copy anything, we will not need the parameters in any case. */
+ *framesizep = 0;
+
+ return sym->st_value;
+}
+
+unsigned int
+la_s390_gnu_pltexit (ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook,
+ uintptr_t *defcook,
+ const struct La_s390_regs *inregs,
+ struct La_s390_retval *outregs, const char *symname)
+{
+ print_exit (refcook, defcook, symname, outregs->lrv_r2);
+
+ return 0;
+}
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c Fri Jan 17 00:01:53 2014
@@ -44,8 +44,24 @@
/* This is doing "libc_hidden_def (__gettimeofday)" but the compiler won't
let us do it in C because it doesn't know we're defining __gettimeofday
here in this file. */
-asm (".globl __GI___gettimeofday\n"
- "__GI___gettimeofday = __gettimeofday");
+asm (".globl __GI___gettimeofday");
+
+/* __GI___gettimeofday is defined as hidden and for ppc32 it enables the
+ compiler make a local call (symbol@local) for internal GLIBC usage. It
+ means the PLT won't be used and the ifunc resolver will be called directly.
+ For ppc64 a call to a function in another translation unit might use a
+ different toc pointer thus disallowing direct branchess and making internal
+ ifuncs calls safe. */
+#ifdef __powerpc64__
+asm ("__GI___gettimeofday = __gettimeofday");
+#else
+int
+__gettimeofday_vsyscall (struct timeval *tv, struct timezone *tz)
+{
+ return INLINE_VSYSCALL (gettimeofday, 2, tv, tz);
+}
+asm ("__GI___gettimeofday = __gettimeofday_vsyscall");
+#endif
#else
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/time.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/time.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/time.c Fri Jan 17 00:01:53 2014
@@ -54,8 +54,24 @@
/* This is doing "libc_hidden_def (time)" but the compiler won't
* let us do it in C because it doesn't know we're defining time
* here in this file. */
-asm (".globl __GI_time\n"
- "__GI_time = time");
+asm (".globl __GI_time");
+
+/* __GI_time is defined as hidden and for ppc32 it enables the
+ compiler make a local call (symbol@local) for internal GLIBC usage. It
+ means the PLT won't be used and the ifunc resolver will be called directly.
+ For ppc64 a call to a function in another translation unit might use a
+ different toc pointer thus disallowing direct branchess and making internal
+ ifuncs calls safe. */
+#ifdef __powerpc64__
+asm ("__GI_time = time");
+#else
+time_t
+__time_vsyscall (time_t *t)
+{
+ return INLINE_VSYSCALL (time, 1, t);
+}
+asm ("__GI_time = __time_vsyscall");
+#endif
#else
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits