Browse Source

Stefan Fiedler:


			
			
				rocklinux
			
			
		
Stefan Fiedler 17 years ago
parent
commit
11a08e7f9f
1 changed files with 130 additions and 0 deletions
  1. +130
    -0
      package/base/glibc/glibc27/glibc-2.7-i586-mem_chk.patch.x86

+ 130
- 0
package/base/glibc/glibc27/glibc-2.7-i586-mem_chk.patch.x86

@ -0,0 +1,130 @@
Copied from http://forums.gentoo.org/viewtopic-p-4476881.html
================================================================
@ -0,0 +1,117 @@
diff -urN glibc-2.7.orig/sysdeps/i386/i586/memcpy_chk.S
libc-2.7/sysdeps/i386/i586/memcpy_chk.S
--- glibc-2.7.orig/sysdeps/i386/i586/memcpy_chk.S 1970-01-01
1:00:00.000000000 +0100
+++ glibc-2.7/sysdeps/i386/i586/memcpy_chk.S 2005-05-14 19:52:13.000000000
0200
@@ -0,0 +1,35 @@
+/* Checking memcpy for i686.
+ Copyright (C) 2004 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include "asm-syntax.h"
+
+#ifndef PIC
+ /* For libc.so this is defined in memcpy.S.
+ For libc.a, this is a separate source to avoid
+ memcpy bringing in __chk_fail and all routines
+ it calls. */
+ .text
+ENTRY (__memcpy_chk)
+ movl 12(%esp), %eax
+ cmpl %eax, 16(%esp)
+ jb __chk_fail
+ jmp memcpy
+END (__memcpy_chk)
+#endif
diff -urN glibc-2.7.orig/sysdeps/i386/i586/mempcpy_chk.S
libc-2.7/sysdeps/i386/i586/mempcpy_chk.S
--- glibc-2.7.orig/sysdeps/i386/i586/mempcpy_chk.S 1970-01-01
1:00:00.000000000 +0100
+++ glibc-2.7/sysdeps/i386/i586/mempcpy_chk.S 2004-10-18 06:17:11.000000000
0200
@@ -0,0 +1,35 @@
+/* Checking mempcpy for x86-64.
+ Copyright (C) 2004 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include "asm-syntax.h"
+
+#ifndef PIC
+ /* For libc.so this is defined in mempcpy.S.
+ For libc.a, this is a separate source to avoid
+ mempcpy bringing in __chk_fail and all routines
+ it calls. */
+ .text
+ENTRY (__mempcpy_chk)
+ movl 12(%esp), %eax
+ cmpl %eax, 16(%esp)
+ jb __chk_fail
+ jmp mempcpy
+END (__mempcpy_chk)
+#endif
diff -urN glibc-2.7.orig/sysdeps/i386/i586/memset_chk.S
libc-2.7/sysdeps/i386/i586/memset_chk.S
--- glibc-2.7.orig/sysdeps/i386/i586/memset_chk.S 1970-01-01
1:00:00.000000000 +0100
+++ glibc-2.7/sysdeps/i386/i586/memset_chk.S 2005-03-01 01:13:36.000000000
0100
@@ -0,0 +1,35 @@
+/* Checking memset for i686.
+ Copyright (C) 2004, 2005 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include "asm-syntax.h"
+
+#ifndef PIC
+ /* For libc.so this is defined in memset.S.
+ For libc.a, this is a separate source to avoid
+ memset bringing in __chk_fail and all routines
+ it calls. */
+ .text
+ENTRY (__memset_chk)
+ movl 12(%esp), %eax
+ cmpl %eax, 16(%esp)
+ jb __chk_fail
+ jmp memset
+END (__memset_chk)
+#endif

Loading…
Cancel
Save