mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

130 lines
4.7 KiB

  1. Copied from http://forums.gentoo.org/viewtopic-p-4476881.html
  2. ================================================================
  3. @ -0,0 +1,117 @@
  4. diff -urN glibc-2.7.orig/sysdeps/i386/i586/memcpy_chk.S
  5. libc-2.7/sysdeps/i386/i586/memcpy_chk.S
  6. --- glibc-2.7.orig/sysdeps/i386/i586/memcpy_chk.S 1970-01-01
  7. 1:00:00.000000000 +0100
  8. +++ glibc-2.7/sysdeps/i386/i586/memcpy_chk.S 2005-05-14 19:52:13.000000000
  9. 0200
  10. @@ -0,0 +1,35 @@
  11. +/* Checking memcpy for i686.
  12. + Copyright (C) 2004 Free Software Foundation, Inc.
  13. + This file is part of the GNU C Library.
  14. +
  15. + The GNU C Library is free software; you can redistribute it and/or
  16. + modify it under the terms of the GNU Lesser General Public
  17. + License as published by the Free Software Foundation; either
  18. + version 2.1 of the License, or (at your option) any later version.
  19. +
  20. + The GNU C Library is distributed in the hope that it will be useful,
  21. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  22. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  23. + Lesser General Public License for more details.
  24. +
  25. + You should have received a copy of the GNU Lesser General Public
  26. + License along with the GNU C Library; if not, write to the Free
  27. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28. + 02111-1307 USA. */
  29. +
  30. +#include <sysdep.h>
  31. +#include "asm-syntax.h"
  32. +
  33. +#ifndef PIC
  34. + /* For libc.so this is defined in memcpy.S.
  35. + For libc.a, this is a separate source to avoid
  36. + memcpy bringing in __chk_fail and all routines
  37. + it calls. */
  38. + .text
  39. +ENTRY (__memcpy_chk)
  40. + movl 12(%esp), %eax
  41. + cmpl %eax, 16(%esp)
  42. + jb __chk_fail
  43. + jmp memcpy
  44. +END (__memcpy_chk)
  45. +#endif
  46. diff -urN glibc-2.7.orig/sysdeps/i386/i586/mempcpy_chk.S
  47. libc-2.7/sysdeps/i386/i586/mempcpy_chk.S
  48. --- glibc-2.7.orig/sysdeps/i386/i586/mempcpy_chk.S 1970-01-01
  49. 1:00:00.000000000 +0100
  50. +++ glibc-2.7/sysdeps/i386/i586/mempcpy_chk.S 2004-10-18 06:17:11.000000000
  51. 0200
  52. @@ -0,0 +1,35 @@
  53. +/* Checking mempcpy for x86-64.
  54. + Copyright (C) 2004 Free Software Foundation, Inc.
  55. + This file is part of the GNU C Library.
  56. +
  57. + The GNU C Library is free software; you can redistribute it and/or
  58. + modify it under the terms of the GNU Lesser General Public
  59. + License as published by the Free Software Foundation; either
  60. + version 2.1 of the License, or (at your option) any later version.
  61. +
  62. + The GNU C Library is distributed in the hope that it will be useful,
  63. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  64. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  65. + Lesser General Public License for more details.
  66. +
  67. + You should have received a copy of the GNU Lesser General Public
  68. + License along with the GNU C Library; if not, write to the Free
  69. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  70. + 02111-1307 USA. */
  71. +
  72. +#include <sysdep.h>
  73. +#include "asm-syntax.h"
  74. +
  75. +#ifndef PIC
  76. + /* For libc.so this is defined in mempcpy.S.
  77. + For libc.a, this is a separate source to avoid
  78. + mempcpy bringing in __chk_fail and all routines
  79. + it calls. */
  80. + .text
  81. +ENTRY (__mempcpy_chk)
  82. + movl 12(%esp), %eax
  83. + cmpl %eax, 16(%esp)
  84. + jb __chk_fail
  85. + jmp mempcpy
  86. +END (__mempcpy_chk)
  87. +#endif
  88. diff -urN glibc-2.7.orig/sysdeps/i386/i586/memset_chk.S
  89. libc-2.7/sysdeps/i386/i586/memset_chk.S
  90. --- glibc-2.7.orig/sysdeps/i386/i586/memset_chk.S 1970-01-01
  91. 1:00:00.000000000 +0100
  92. +++ glibc-2.7/sysdeps/i386/i586/memset_chk.S 2005-03-01 01:13:36.000000000
  93. 0100
  94. @@ -0,0 +1,35 @@
  95. +/* Checking memset for i686.
  96. + Copyright (C) 2004, 2005 Free Software Foundation, Inc.
  97. + This file is part of the GNU C Library.
  98. +
  99. + The GNU C Library is free software; you can redistribute it and/or
  100. + modify it under the terms of the GNU Lesser General Public
  101. + License as published by the Free Software Foundation; either
  102. + version 2.1 of the License, or (at your option) any later version.
  103. +
  104. + The GNU C Library is distributed in the hope that it will be useful,
  105. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  106. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  107. + Lesser General Public License for more details.
  108. +
  109. + You should have received a copy of the GNU Lesser General Public
  110. + License along with the GNU C Library; if not, write to the Free
  111. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  112. + 02111-1307 USA. */
  113. +
  114. +#include <sysdep.h>
  115. +#include "asm-syntax.h"
  116. +
  117. +#ifndef PIC
  118. + /* For libc.so this is defined in memset.S.
  119. + For libc.a, this is a separate source to avoid
  120. + memset bringing in __chk_fail and all routines
  121. + it calls. */
  122. + .text
  123. +ENTRY (__memset_chk)
  124. + movl 12(%esp), %eax
  125. + cmpl %eax, 16(%esp)
  126. + jb __chk_fail
  127. + jmp memset
  128. +END (__memset_chk)
  129. +#endif