[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 09/20] aarch64: Move saving user entry into _dl_start_user
From: |
Sergey Bugaev |
Subject: |
[PATCH v2 09/20] aarch64: Move saving user entry into _dl_start_user |
Date: |
Sat, 23 Mar 2024 20:32:50 +0300 |
In the Hurd ports, _dl_start () does not return the normal way; instead,
_dl_sysdep_start () jumps to _dl_start_user directly using the RETURN_TO
macro. Unlike in the i386 and x86_64 ports, the instruction that was
saving the returned user entry into a different register (to avoid it
getting clobbered by the _dl_init () call) was not marked as a part of
_dl_start_user, causing it to be skipped when jumping to _dl_start_user
using RETURN_TO, and control subsequently getting transferred to a
random address left in x21.
This should not make any difference for Linux ports, other than the
_dl_start_user label pointing to an earlier instruction.
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
sysdeps/aarch64/dl-start.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sysdeps/aarch64/dl-start.S b/sysdeps/aarch64/dl-start.S
index d645484e..e35431ca 100644
--- a/sysdeps/aarch64/dl-start.S
+++ b/sysdeps/aarch64/dl-start.S
@@ -29,10 +29,10 @@ ENTRY (_start)
PTR_ARG (0)
bl _dl_start
/* Returns user entry point in x0. */
- mov PTR_REG (21), PTR_REG (0)
.globl _dl_start_user
.type _dl_start_user, %function
_dl_start_user:
+ mov PTR_REG (21), PTR_REG (0)
/* Get argc. */
ldr PTR_REG (1), [sp]
/* Get argv. */
--
2.44.0
- [PATCH v2 11/20] mach: Add a basic AArch64 port, (continued)
- [PATCH v2 11/20] mach: Add a basic AArch64 port, Sergey Bugaev, 2024/03/23
- [PATCH v2 13/20] hurd: Add a basic AArch64 port, Sergey Bugaev, 2024/03/23
- [PATCH v2 18/20] htl: Implement some support for TLS_DTV_AT_TP, Sergey Bugaev, 2024/03/23
- [PATCH v2 02/20] hurd: Stop relying on VM_MAX_ADDRESS, Sergey Bugaev, 2024/03/23
- [PATCH v2 03/20] Allow glibc to be compiled without EXEC_PAGESIZE, Sergey Bugaev, 2024/03/23
- [PATCH v2 07/20] aarch64: Move pointer_guard.h out of sysdeps/unix/sysv/linux, Sergey Bugaev, 2024/03/23
- [PATCH v2 10/20] aarch64: Allow building without kernel support for BTI, Sergey Bugaev, 2024/03/23
- [PATCH v2 12/20] mach: Declare the new thread_set_self_state () trap, Sergey Bugaev, 2024/03/23
- [PATCH v2 15/20] hurd: Implement longjmp for AArch64, Sergey Bugaev, 2024/03/23
- [PATCH v2 17/20] hurd: Add an AArch64 signal implementation, Sergey Bugaev, 2024/03/23
- [PATCH v2 09/20] aarch64: Move saving user entry into _dl_start_user,
Sergey Bugaev <=
- [PATCH v2 14/20] hurd: Implement TLS on AArch64, Sergey Bugaev, 2024/03/23
- [PATCH v2 16/20] Add FPE_FLTIDO, Sergey Bugaev, 2024/03/23
- [PATCH v2 19/20] htl: Add an AArch64 implementation, Sergey Bugaev, 2024/03/23
- [PATCH v2 20/20] hurd: Add expected aarch64-gnu abistlists, Sergey Bugaev, 2024/03/23
- Re: [PATCH v2 00/20] aarch64-gnu port & GNU/Hurd on AArch64 progress, Samuel Thibault, 2024/03/23