i386/clone.S: Remove redundant EBX load

Message ID 20210220160353.318800-1-hjl.tools@gmail.com
State New
Headers show
Series
  • i386/clone.S: Remove redundant EBX load
Related show

Commit Message

Noah Goldstein via Libc-alpha Feb. 20, 2021, 4:03 p.m.
There is no neeed for

	call	L(here)
L(here):
	popl	%ebx
	addl	$_GLOBAL_OFFSET_TABLE_+[.-L(here)], %ebx

before

	movl	%eax, %ebx
---
 sysdeps/unix/sysv/linux/i386/clone.S | 6 ------
 1 file changed, 6 deletions(-)

-- 
2.29.2

Comments

Noah Goldstein via Libc-alpha Feb. 22, 2021, 8:33 a.m. | #1
* H. J. Lu via Libc-alpha:

> diff --git a/sysdeps/unix/sysv/linux/i386/clone.S b/sysdeps/unix/sysv/linux/i386/clone.S

> index 91c4b65fea..8ec84491bb 100644

> --- a/sysdeps/unix/sysv/linux/i386/clone.S

> +++ b/sysdeps/unix/sysv/linux/i386/clone.S

> @@ -106,12 +106,6 @@ L(thread_start):

>  	/* Note: %esi is zero.  */

>  	movl	%esi,%ebp	/* terminate the stack frame */

>  	call	*%ebx

> -#ifdef PIC

> -	call	L(here)

> -L(here):

> -	popl	%ebx

> -	addl	$_GLOBAL_OFFSET_TABLE_+[.-L(here)], %ebx

> -#endif

>  	movl	%eax, %ebx

>  	movl	$SYS_ify(exit), %eax

>  	ENTER_KERNEL


Looks okay.  Thanks.

Florian

Patch

diff --git a/sysdeps/unix/sysv/linux/i386/clone.S b/sysdeps/unix/sysv/linux/i386/clone.S
index 91c4b65fea..8ec84491bb 100644
--- a/sysdeps/unix/sysv/linux/i386/clone.S
+++ b/sysdeps/unix/sysv/linux/i386/clone.S
@@ -106,12 +106,6 @@  L(thread_start):
 	/* Note: %esi is zero.  */
 	movl	%esi,%ebp	/* terminate the stack frame */
 	call	*%ebx
-#ifdef PIC
-	call	L(here)
-L(here):
-	popl	%ebx
-	addl	$_GLOBAL_OFFSET_TABLE_+[.-L(here)], %ebx
-#endif
 	movl	%eax, %ebx
 	movl	$SYS_ify(exit), %eax
 	ENTER_KERNEL