Re: [PATCH] sparc: Avoid unsupported LLD branch relocations

Rosen Penev <[email protected]>
Newsgroups gmane.linux.ports.sparc,gmane.linux.kernel
Message-ID <CAKxU2N_p7unDCif826jpTUtzs8=-ZoKw4u-Eg1UEM+4o+5Fbzg@mail.gmail.com>
On Wed, May 13, 2026 at 10:03 PM John Paul Adrian Glaubitz
<[email protected]> wrote:
>
> Hi Rosen,
>
> On Wed, 2026-05-13 at 21:19 -0700, Rosen Penev wrote:
> > LLD does not support several SPARC branch relocation types, including
> > R_SPARC_WDISP16, R_SPARC_WDISP19, and R_SPARC_WDISP22. A sparc64
> > allmodconfig LLVM build can therefore fail when trap table code and
> > low-level assembly leave branches to global symbols for the linker.
> >
> > Use local labels for branches that stay within the same assembled
> > object so the assembler can resolve them directly. Convert the
> > remaining cross-object branches and tail calls to absolute set/jmpl
> > sequences, which LLD handles through the usual HI22/LO10 relocations.
> >
> > Disable the unused sparc32 syscall trace entry points when compat
> > support is not built, and request sys_llseek for the native syscall
> > table so the LLD allmodconfig build remains self-contained.
>
> I would rather fix LLD than making such intrusive changes to the SPARC
> code in the kernel. In particular, since this touches the CPU-optimized
> memory routines which had been haunted by subtle bugs for years and were
> only fixed recently.
>
> Is improving LLD in this case not possible?
Above my paygrade. I use this so that allmodconfig succeeds.
>
> Adrian
>
> --
>  .''`.  John Paul Adrian Glaubitz
> : :' :  Debian Developer
> `. `'   Physicist
>   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.