diff options
author | Ulrich Drepper <drepper@redhat.com> | 2007-09-15 22:24:03 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2007-09-15 22:24:03 +0000 |
commit | 9bdfff60008403ff693ccc71da5957a4e57bfc25 (patch) | |
tree | cb7de7f1f3466c4ecd822ac3dc8e59b9fbff7d38 /sysdeps | |
parent | ab905672b7afba3f862ca6b84921b497269b26ab (diff) | |
download | glibc-9bdfff60008403ff693ccc71da5957a4e57bfc25.zip glibc-9bdfff60008403ff693ccc71da5957a4e57bfc25.tar.gz glibc-9bdfff60008403ff693ccc71da5957a4e57bfc25.tar.bz2 |
* sysdeps/i386/i586/memcpy.S (__memcpy_chk): New definition.
* sysdeps/i386/i586/mempcpy.S (__memcpy_chk): New definition.
* sysdeps/i386/i586/memset.S (__memset_chk): New definition.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/i386/i586/memcpy.S | 7 | ||||
-rw-r--r-- | sysdeps/i386/i586/mempcpy.S | 1 | ||||
-rw-r--r-- | sysdeps/i386/i586/memset.S | 7 |
3 files changed, 15 insertions, 0 deletions
diff --git a/sysdeps/i386/i586/memcpy.S b/sysdeps/i386/i586/memcpy.S index 6ab457f..677a7e6 100644 --- a/sysdeps/i386/i586/memcpy.S +++ b/sysdeps/i386/i586/memcpy.S @@ -35,6 +35,13 @@ #define LEN SRC+PTR_SIZE .text +#if defined PIC && !defined NOT_IN_libc +ENTRY (__memcpy_chk) + movl 12(%esp), %eax + cmpl %eax, 16(%esp) + jb HIDDEN_JUMPTARGET (__chk_fail) +END (__memcpy_chk) +#endif ENTRY (BP_SYM (memcpy)) ENTER diff --git a/sysdeps/i386/i586/mempcpy.S b/sysdeps/i386/i586/mempcpy.S index 0c9520e3..f492be7 100644 --- a/sysdeps/i386/i586/mempcpy.S +++ b/sysdeps/i386/i586/mempcpy.S @@ -1,4 +1,5 @@ #define memcpy __mempcpy +#define __memcpy_chk __mempcpy_chk #include <sysdeps/i386/i586/memcpy.S> libc_hidden_def (BP_SYM (__mempcpy)) diff --git a/sysdeps/i386/i586/memset.S b/sysdeps/i386/i586/memset.S index c21e9f7..3295b48 100644 --- a/sysdeps/i386/i586/memset.S +++ b/sysdeps/i386/i586/memset.S @@ -38,6 +38,13 @@ #endif .text +#if defined PIC && !defined NOT_IN_libc && !BZERO_P +ENTRY (__memset_chk) + movl 12(%esp), %eax + cmpl %eax, 16(%esp) + jb HIDDEN_JUMPTARGET (__chk_fail) +END (__memset_chk) +#endif ENTRY (BP_SYM (memset)) ENTER |