From: Willy Tarreau <w@1wt.eu>
To: Daniel Palmer <daniel@thingy.jp>
Cc: linux@weissschuh.net, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v2 01/10] elf: Add relocation types used by nolibc
Date: Sat, 7 Feb 2026 16:35:20 +0100 [thread overview]
Message-ID: <aYdbuCbWA_jUcKP_@1wt.eu> (raw)
In-Reply-To: <20260204124542.523567-2-daniel@thingy.jp>
On Wed, Feb 04, 2026 at 09:45:33PM +0900, Daniel Palmer wrote:
> nolibc based programs are gaining the ability to relocate themselves
> so that they can support PIE without needing a linker or special
> crt from the toolchain.
>
> Add the required relocation types.
>
> Signed-off-by: Daniel Palmer <daniel@thingy.jp>
> ---
> include/uapi/linux/elf-r.h | 27 +++++++++++++++++++++++++++
> include/uapi/linux/elf.h | 1 +
> 2 files changed, 28 insertions(+)
> create mode 100644 include/uapi/linux/elf-r.h
>
> diff --git a/include/uapi/linux/elf-r.h b/include/uapi/linux/elf-r.h
> new file mode 100644
> index 000000000000..a1dce23104a7
> --- /dev/null
> +++ b/include/uapi/linux/elf-r.h
> @@ -0,0 +1,27 @@
> +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
> +#ifndef _LINUX_ELF_R_H
> +#define _LINUX_ELF_R_H
> +
> +/* These constants define various ELF relocation types */
> +#define R_386_RELATIVE 8
> +
> +#define R_68K_RELATIVE 22
> +
> +#define R_AARCH64_RELATIVE 1027
> +
> +#define R_AMD64_RELATIVE 8
> +
> +#define R_ARM_RELATIVE 23
> +
> +#define R_LARCH_RELATIVE 3
> +
> +#define R_PPC_RELATIVE 22
> +
> +#define R_RISCV_RELATIVE 3
> +
> +#define R_SH_RELATIVE 165
> +
> +#define R_SPARC_NONE 0
> +#define R_SPARC_RELATIVE 22
Maybe a comment indicating where to find these values would be helpful
for future architectures ?
Willy
next prev parent reply other threads:[~2026-02-07 15:35 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-04 12:45 [RFC PATCH v2 00/10] nolibc: Add static-pie support Daniel Palmer
2026-02-04 12:45 ` [RFC PATCH v2 01/10] elf: Add relocation types used by nolibc Daniel Palmer
2026-02-07 15:35 ` Willy Tarreau [this message]
2026-02-16 20:33 ` Thomas Weißschuh
2026-02-04 12:45 ` [RFC PATCH v2 02/10] tools/nolibc: crt: Split _start_c() into stack-only and normal parts Daniel Palmer
2026-02-07 15:45 ` Willy Tarreau
2026-02-08 1:40 ` Daniel Palmer
2026-02-16 20:42 ` Thomas Weißschuh
2026-02-04 12:45 ` [RFC PATCH v2 03/10] tools/nolibc: Add basic ELF self-relocation support for static PIE Daniel Palmer
2026-02-07 15:49 ` Willy Tarreau
2026-02-04 12:45 ` [RFC PATCH v2 04/10] tools/nolibc: m68k: Add relocation support Daniel Palmer
2026-02-16 20:51 ` Thomas Weißschuh
2026-02-04 12:45 ` [RFC PATCH v2 05/10] tools/nolibc: x86: " Daniel Palmer
2026-02-16 21:06 ` Thomas Weißschuh
2026-02-04 12:45 ` [RFC PATCH v2 06/10] tools/nolibc: riscv: " Daniel Palmer
2026-02-04 12:45 ` [RFC PATCH v2 07/10] tools/nolibc: arm: " Daniel Palmer
2026-02-04 12:45 ` [RFC PATCH v2 08/10] tools/nolibc: sh: " Daniel Palmer
2026-02-04 12:45 ` [RFC PATCH v2 09/10] tools/nolibc: ppc: " Daniel Palmer
2026-02-04 12:45 ` [RFC PATCH v2 10/10] selftests/nolibc: Add option for building with -static-pie Daniel Palmer
2026-02-16 20:59 ` Thomas Weißschuh
2026-02-07 15:34 ` [RFC PATCH v2 00/10] nolibc: Add static-pie support Willy Tarreau
2026-02-08 1:35 ` Daniel Palmer
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=aYdbuCbWA_jUcKP_@1wt.eu \
--to=w@1wt.eu \
--cc=daniel@thingy.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.