aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2025-08-02 10:12:01 +1000
committerRichard Henderson <richard.henderson@linaro.org>2025-08-28 06:39:25 +1000
commit05c84cf8df23b8dc81317ee0cea748e6199637f4 (patch)
tree3c90af9fc7704c9943a7942fd37e393f216bf05e /linux-user
parent5fc03d4e28258fdf6a926a59c6b5e1edc23e6d5d (diff)
downloadqemu-05c84cf8df23b8dc81317ee0cea748e6199637f4.zip
qemu-05c84cf8df23b8dc81317ee0cea748e6199637f4.tar.gz
qemu-05c84cf8df23b8dc81317ee0cea748e6199637f4.tar.bz2
semihosting: Retrieve stack top from image_info
Remove the write-once field TaskState.stack_base, and use the same value from struct image_info. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/aarch64/cpu_loop.c1
-rw-r--r--linux-user/arm/cpu_loop.c1
-rw-r--r--linux-user/m68k/cpu_loop.c1
-rw-r--r--linux-user/qemu.h1
-rw-r--r--linux-user/riscv/cpu_loop.c1
5 files changed, 0 insertions, 5 deletions
diff --git a/linux-user/aarch64/cpu_loop.c b/linux-user/aarch64/cpu_loop.c
index fea43ce..b65999a 100644
--- a/linux-user/aarch64/cpu_loop.c
+++ b/linux-user/aarch64/cpu_loop.c
@@ -168,7 +168,6 @@ void target_cpu_copy_regs(CPUArchState *env, target_pt_regs *regs)
qemu_guest_getrandom_nofail(&env->keys, sizeof(env->keys));
}
- ts->stack_base = info->start_stack;
ts->heap_base = info->brk;
/* This will be filled in on the first SYS_HEAPINFO call. */
ts->heap_limit = 0;
diff --git a/linux-user/arm/cpu_loop.c b/linux-user/arm/cpu_loop.c
index 33f6395..e40d6be 100644
--- a/linux-user/arm/cpu_loop.c
+++ b/linux-user/arm/cpu_loop.c
@@ -504,7 +504,6 @@ void target_cpu_copy_regs(CPUArchState *env, target_pt_regs *regs)
arm_rebuild_hflags(env);
#endif
- ts->stack_base = info->start_stack;
ts->heap_base = info->brk;
/* This will be filled in on the first SYS_HEAPINFO call. */
ts->heap_limit = 0;
diff --git a/linux-user/m68k/cpu_loop.c b/linux-user/m68k/cpu_loop.c
index 5da91b9..3aaaf02 100644
--- a/linux-user/m68k/cpu_loop.c
+++ b/linux-user/m68k/cpu_loop.c
@@ -117,7 +117,6 @@ void target_cpu_copy_regs(CPUArchState *env, target_pt_regs *regs)
env->aregs[7] = regs->usp;
env->sr = regs->sr;
- ts->stack_base = info->start_stack;
ts->heap_base = info->brk;
/* This will be filled in on the first SYS_HEAPINFO call. */
ts->heap_limit = 0;
diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index 0b19fa4..b662153 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -127,7 +127,6 @@ struct TaskState {
abi_ulong heap_base;
abi_ulong heap_limit;
#endif
- abi_ulong stack_base;
int used; /* non zero if used */
struct image_info *info;
struct linux_binprm *bprm;
diff --git a/linux-user/riscv/cpu_loop.c b/linux-user/riscv/cpu_loop.c
index 3ac8bbf..541de76 100644
--- a/linux-user/riscv/cpu_loop.c
+++ b/linux-user/riscv/cpu_loop.c
@@ -109,7 +109,6 @@ void target_cpu_copy_regs(CPUArchState *env, target_pt_regs *regs)
exit(EXIT_FAILURE);
}
- ts->stack_base = info->start_stack;
ts->heap_base = info->brk;
/* This will be filled in on the first SYS_HEAPINFO call. */
ts->heap_limit = 0;