On Wed, 30 Jul 2025 at 01:34, Richard Henderson <richard.hender...@linaro.org> wrote: > > Signed-off-by: Richard Henderson <richard.hender...@linaro.org> > --- > linux-user/sparc/target_elf.h | 11 +++++++++++ > linux-user/elfload.c | 15 --------------- > 2 files changed, 11 insertions(+), 15 deletions(-) > > diff --git a/linux-user/sparc/target_elf.h b/linux-user/sparc/target_elf.h > index 7e46748d26..8bd6e3e427 100644 > --- a/linux-user/sparc/target_elf.h > +++ b/linux-user/sparc/target_elf.h > @@ -8,4 +8,15 @@ > #ifndef SPARC_TARGET_ELF_H > #define SPARC_TARGET_ELF_H > > +#ifndef TARGET_SPARC64 > +# define ELF_CLASS ELFCLASS32 > +# define ELF_ARCH EM_SPARC > +#elif defined(TARGET_ABI32) > +# define ELF_CLASS ELFCLASS32 > +# define elf_check_arch(x) ((x) == EM_SPARC32PLUS || (x) == EM_SPARC) > +#else > +# define ELF_CLASS ELFCLASS64 > +# define ELF_ARCH EM_SPARCV9 > +#endif
Why does sparc share 64 and 32 bit in one header file with an ifdef when the other archs like mips and arm have separate headers, by the way ? -- PMM