On Wed, 30 Jul 2025 at 01:15, Richard Henderson
<richard.hender...@linaro.org> wrote:
>
> The goal is to kill the massive target ifdef ladder in elfload.c.
>
> The functions get moved to linux-user/target/elfload.c.
> Define weak functions to provide a default value, or a
> weak reference to determine if the function is provided.
>
> The core dump types and functions are moved to
> linux-user/target/target_coredump.h.
>
> The macros get moved to linux-user/target/target_elf.h.
> These are mostly use to parameterize include/elf.h, but
> there are some other outliers.
>
> The init_thread functions, storing into target_pt_regs, have been
> merged with target_cpu_copy_regs, copying out of target_pt_regs
> into CPUArchState.  Merging these found a few bits of silliness
> where pt_regs fields were initialized but not used.  To encourage
> this never to return, remove most target_pt_regs and hide the rest
> within the relevant signal.c.

Thanks for doing this -- it's one of those cleanups that's
been lingering around not done for years. I think I've
reviewed (or commented on) all the patches in the series now.

A quick grep suggests that about the only remaining target ifdef
ladder we have in the codebase is in linux-user/syscall_defs.h
(where we have things like "struct target_stat for each architecture,
and some of them get to share the asm-generic version".)

-- PMM

Reply via email to