mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ardb@kernel.org>
To: "Yao Zi" <me@ziyao.cc>,
	"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
	"Nathan Chancellor" <nathan@kernel.org>
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] MIPS: tools: relocs: Ship a definition of R_MIPS_PC32
Date: Mon, 02 Feb 2026 10:17:53 +0100	[thread overview]
Message-ID: <99c54e93-fb8c-4bdb-ad40-a3161a42bb8b@app.fastmail.com> (raw)
In-Reply-To: <20260202041610.61389-1-me@ziyao.cc>


On Mon, 2 Feb 2026, at 05:16, Yao Zi wrote:
> R_MIPS_PC32 is a GNU extension, its definition is available in glibc
> only since 2.39 (released in 2024), and not available in musl libc yet.
> Provide our own definition for R_MIPS_PC32 and use it if necessary to
> fix relocs tool building on musl and older glibc systems.
>
> Fixes: ff79d31eb536 ("mips: Add support for PC32 relocations in vmlinux")
> Signed-off-by: Yao Zi <me@ziyao.cc>

Thanks for fixing this.

It does imply that the subsequent kallsyms patch will result in 32-bit MIPS no longer being buildable with older toolchains if CONFIG_RELOCATABLE=y.

Not sure if that is an issue, but it needs calling out. Nathan, any thoughts?

> ---
>  arch/mips/boot/tools/relocs.h | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/arch/mips/boot/tools/relocs.h b/arch/mips/boot/tools/relocs.h
> index 607ff0103064..942981d9ce73 100644
> --- a/arch/mips/boot/tools/relocs.h
> +++ b/arch/mips/boot/tools/relocs.h
> @@ -29,6 +29,13 @@ void die(char *fmt, ...);
>  #define R_MIPS_PC26_S2		61
>  #endif
> 
> +/*
> + * GNU extension that available in glibc only since 2023, not 
> available on musl.
> + */
> +#ifndef R_MIPS_PC32
> +#define R_MIPS_PC32		248
> +#endif
> +
>  #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
> 
>  enum symtype {
> -- 
> 2.52.0

  reply	other threads:[~2026-02-02  9:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-02  4:16 Yao Zi
2026-02-02  9:17 ` Ard Biesheuvel [this message]
2026-02-02 23:07   ` Nathan Chancellor
2026-02-03  3:56     ` Yao Zi
2026-02-03 12:31       ` Ard Biesheuvel
2026-02-05  1:26       ` Maciej W. Rozycki
2026-02-05  8:26         ` Yao Zi
2026-02-05  8:39         ` Ard Biesheuvel
2026-02-03 18:53 ` Nathan Chancellor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=99c54e93-fb8c-4bdb-ad40-a3161a42bb8b@app.fastmail.com \
    --to=ardb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=me@ziyao.cc \
    --cc=nathan@kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®