[PATCH v2] Place ENTRY_POINT in .text.unlikely section [BZ #28153]

Florian Weimer fweimer@redhat.com
Sat Jul 31 16:36:26 GMT 2021


* H. J. Lu via Libc-alpha:

> diff --git a/sysdeps/aarch64/start.S b/sysdeps/aarch64/start.S
> index 417da8802b..e46e01ed0b 100644
> --- a/sysdeps/aarch64/start.S
> +++ b/sysdeps/aarch64/start.S
> @@ -42,7 +42,7 @@
>  					NULL
>   */
>  
> -	.text
> +	.section .text.unlikely,"ax",%progbits
>  ENTRY(_start)
>  	/* Create an initial frame with 0 LR and FP */
>  	cfi_undefined (x30)

I don't think it's correct to place code that runs during every process
start into .text.unlikely.  Surely we can avoid that page fault.

Can we fix the ENTRY_POINT assumption in profiling instead?

Thanks,
Florian



More information about the Libc-alpha mailing list