[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250814224009.GA2217114@ax162>
Date: Thu, 14 Aug 2025 15:40:09 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: Koakuma <koachan@...tonmail.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Andreas Larsson <andreas@...sler.com>,
Nick Desaulniers <nick.desaulniers+lkml@...il.com>,
Bill Wendling <morbo@...gle.com>,
Justin Stitt <justinstitt@...gle.com>, sparclinux@...r.kernel.org,
linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH 1/2] sparc/module: Add R_SPARC_UA64 relocation handling
On Sun, Aug 03, 2025 at 01:15:02AM +0000, Koakuma wrote:
> Koakuma via B4 Relay <devnull+koachan.protonmail.com@...nel.org> wrote:
>
> > From: Koakuma koachan@...tonmail.com
> >
> >
> > This is needed so that the kernel can handle R_SPARC_UA64 relocations,
> > which is emitted by LLVM's IAS.
> >
> > Signed-off-by: Koakuma koachan@...tonmail.com
> >
> > ---
> > arch/sparc/include/asm/elf_64.h | 1 +
> > arch/sparc/kernel/module.c | 1 +
> > 2 files changed, 2 insertions(+)
> >
> > diff --git a/arch/sparc/include/asm/elf_64.h b/arch/sparc/include/asm/elf_64.h
> > index 8fb09eec8c3e796a9a79aa0a7877842ceb7ea6d3..694ed081cf8d99adf70be25e5dc0e30a45f70398 100644
> > --- a/arch/sparc/include/asm/elf_64.h
> > +++ b/arch/sparc/include/asm/elf_64.h
> > @@ -58,6 +58,7 @@
> > #define R_SPARC_7 43
> > #define R_SPARC_5 44
> > #define R_SPARC_6 45
> > +#define R_SPARC_UA64 54
> >
> > /* Bits present in AT_HWCAP, primarily for Sparc32. */
> > #define HWCAP_SPARC_FLUSH 0x00000001
> > diff --git a/arch/sparc/kernel/module.c b/arch/sparc/kernel/module.c
> > index b8c51cc23d96944037494f13d2d65a43bb187729..6e3d4dde4f9ab33040b300c40d5fd5d0584e166d 100644
> > --- a/arch/sparc/kernel/module.c
> > +++ b/arch/sparc/kernel/module.c
> > @@ -87,6 +87,7 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
> > break;
> > #ifdef CONFIG_SPARC64
> > case R_SPARC_64:
> > + case R_SPARC_UA64:
> > location[0] = v >> 56;
> >
> > location[1] = v >> 48;
> >
> > location[2] = v >> 40;
> >
> >
> > --
> > 2.49.0
>
> Ping. Is there anything else I should do for this?
>
This seems reasonable to me, sorry for the delay in commenting. I would
expect this to go via the SPARC tree but if they are too busy or
unavailable to pick this up, we would try to route it via Andrew Morton.
Is there more work needed for the integrated assembler other than this
series?
Cheers,
Nathan
Powered by blists - more mailing lists