On 6/4/26 14:44, Helge Deller wrote:
On 5/27/26 17:53, Richard Henderson wrote:
On 5/26/26 12:05, Helge Deller wrote:
+/*
+ * Matches the kernel's elf_gregset_t (ELF_NGREG = 33):
+ * r0-r30 at indices 0-30, pc at 31, ps at 32.
+ * r31 (hardwired zero) is not stored; pc occupies index 31.
+ */
+typedef struct target_elf_gregset_t {
+ abi_ulong regs[31]; /* integer registers r0-r30 [0..30] */
+ abi_ulong pc; /* program counter [31] */
+ abi_ulong ps; /* processor status [32] */
+} target_elf_gregset_t;
+
But see dump_elf_thread():
/* Once upon a time this was the PS value. Which is stupid
since that is always 8 for usermode. Usurped for the more
useful value of the thread's UNIQUE field. */
dest[32] = ti->pcb.unique;
Ok, what is your suggestion here?
Replace ps with unique? According to kernel this then should get the tls value.
What is this then in linux-user?
env->unique.
r~