arrfab / rpms / glibc

Forked from rpms/glibc 4 years ago
Clone

Blame SOURCES/glibc-rh1335286-0.patch

147e83
On top of this patch we include a few more redirecting versions of
147e83
the rtld-* routines in multiarch, this is needed because of the
147e83
sysd-rules which try to build from multiarch first and will even
147e83
use memset.S from multiarch to buidl rtld-memset.os, which results
147e83
in SSE register usage in rtld which we can't allow because of
147e83
lazy binding (though in some cases we use RTLD_PREPARE_FOREIGN_CALL
147e83
and others to wrap such calls).
147e83
147e83
commit 747ef469ffc9c9179ca9d76854167925b4e44346
147e83
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
147e83
Date:   Sat Jun 15 00:09:26 2013 +0530
147e83
147e83
    Add rtld-memset.S for x86_64
147e83
    
147e83
    Resolves: BZ #15627
147e83
    
147e83
    Add an assembler version of rtld-memset to avoid using SSE registers.
147e83
147e83
Index: glibc-2.17-c758a686/sysdeps/x86_64/rtld-memset.S
147e83
===================================================================
147e83
--- /dev/null
147e83
+++ glibc-2.17-c758a686/sysdeps/x86_64/rtld-memset.S
147e83
@@ -0,0 +1,37 @@
147e83
+/* memset implementation for the dynamic linker.  This is separate from the
147e83
+   libc implementation to avoid writing to SSE registers.
147e83
+   Copyright (C) 2013 Free Software Foundation, Inc.
147e83
+   This file is part of the GNU C Library.
147e83
+
147e83
+   The GNU C Library is free software; you can redistribute it and/or
147e83
+   modify it under the terms of the GNU Lesser General Public
147e83
+   License as published by the Free Software Foundation; either
147e83
+   version 2.1 of the License, or (at your option) any later version.
147e83
+
147e83
+   The GNU C Library is distributed in the hope that it will be useful,
147e83
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
147e83
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
147e83
+   Lesser General Public License for more details.
147e83
+
147e83
+   You should have received a copy of the GNU Lesser General Public
147e83
+   License along with the GNU C Library; if not, see
147e83
+   <http://www.gnu.org/licenses/>.  */
147e83
+
147e83
+#include <sysdep.h>
147e83
+#include "asm-syntax.h"
147e83
+
147e83
+
147e83
+	.text
147e83
+/* void *memset (void *dest, char c, size_t count)
147e83
+   dest	 => %rdi
147e83
+   c	 => %rsi
147e83
+   count => %rdx  */
147e83
+ENTRY (memset)
147e83
+	mov	%rdx, %rcx
147e83
+	movzbl	%sil, %eax
147e83
+	mov	%rdi, %rdx
147e83
+	rep	stosb
147e83
+	mov	%rdx, %rax
147e83
+	ret
147e83
+END (memset)
147e83
+libc_hidden_builtin_def (memset)
147e83
Index: glibc-2.17-c758a686/sysdeps/x86_64/rtld-memset.c
147e83
===================================================================
147e83
--- glibc-2.17-c758a686.orig/sysdeps/x86_64/rtld-memset.c
147e83
+++ /dev/null
147e83
@@ -1 +0,0 @@
147e83
-#include <string/memset.c>
147e83
Index: glibc-2.17-c758a686/sysdeps/x86_64/multiarch/rtld-memset.S
147e83
===================================================================
147e83
--- /dev/null
147e83
+++ glibc-2.17-c758a686/sysdeps/x86_64/multiarch/rtld-memset.S
147e83
@@ -0,0 +1 @@
147e83
+#include "../rtld-memset.S"
147e83
Index: glibc-2.17-c758a686/sysdeps/x86_64/multiarch/rtld-strchr.S
147e83
===================================================================
147e83
--- /dev/null
147e83
+++ glibc-2.17-c758a686/sysdeps/x86_64/multiarch/rtld-strchr.S
147e83
@@ -0,0 +1 @@
147e83
+#include "../rtld-strchr.S"