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