When not using PIC don't use jecxz since the label might be far away.
authordrepper <drepper>
Tue, 26 Jan 1999 13:38:45 +0000 (13:38 +0000)
committerdrepper <drepper>
Tue, 26 Jan 1999 13:38:45 +0000 (13:38 +0000)
sysdeps/unix/sysv/linux/i386/clone.S

index 9b0284b..7a2025b 100644 (file)
@@ -32,9 +32,19 @@ ENTRY(__clone)
        /* Sanity check arguments.  */
        movl    $-EINVAL,%eax
        movl    4(%esp),%ecx            /* no NULL function pointers */
+#ifdef PIC
        jecxz   SYSCALL_ERROR_LABEL
+#else
+       testl   %ecx,%ecx
+       jz      SYSCALL_ERROR_LABEL
+#endif
        movl    8(%esp),%ecx            /* no NULL stack pointers */
+#ifdef PIC
        jecxz   SYSCALL_ERROR_LABEL
+#else
+       testl   %ecx,%ecx
+       jz      SYSCALL_ERROR_LABEL
+#endif
 
        /* Insert the argument onto the new stack.  */
        subl    $8,%ecx