From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta1.formilux.org (mta1.formilux.org [51.159.59.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B8A852745C for ; Sat, 7 Feb 2026 15:35:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=51.159.59.229 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770478522; cv=none; b=MWgB5zmHEhDfnfFrLvi0Jw1X+KNEpGs6TwrGlsDKGvmSDzYQukC12A8d00p8sQMqGZfZNCj+Ez6uFJcixQfyiOcFMmVL2kYAQ2N7XyBhcLpzFnclfJG4gNb5ozKjvI3F+qmTZ/2U80bfic/O6C/G5I8AFmwIHgeKI1OmY2yCzpI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770478522; c=relaxed/simple; bh=sS5V1o8wqYicwRWDkdV5saNFkIXB9541EHswl3VZKYo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NXmOY/9CpYPEVbYJmUT46y7s+irAXJdLOnICRsDlr0AEbCLnLwIj9yTP90bTjDJMMQT8fO86yDcOeeYYQAT/ZuX5Sv/+T0h/deRotZskpBw3y0Qy00Vp3S6bYd7j5FDHhqjxLRWXh0SWVDcz4dtD31xM4/BdYCd8+FW74Dwsz2A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=1wt.eu; spf=pass smtp.mailfrom=1wt.eu; dkim=pass (1024-bit key) header.d=1wt.eu header.i=@1wt.eu header.b=jN7L7ZU6; arc=none smtp.client-ip=51.159.59.229 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=1wt.eu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=1wt.eu Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=1wt.eu header.i=@1wt.eu header.b="jN7L7ZU6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1wt.eu; s=mail; t=1770478520; bh=3X7KtzDzggttZ661TIopUR4IeOpEnWOeJWwSXUWbOq4=; h=From:Message-ID:From; b=jN7L7ZU6NjFBLg9iCn2CZIRTs6+s6PhfHAzYYPXPhrGZYMMIriVtobhStikkhHT1c EAf1q8Dl0yfaNII61PzKN1dcwSQY6fRHI45m6Gspem9djA4y2jep17PjqQOOOfazh7 o4WvtSns4LBq5/CnHA7hneqEdHTSuefkFNDsGYPo= Received: from 1wt.eu (ded1.1wt.eu [163.172.96.212]) by mta1.formilux.org (Postfix) with ESMTP id 4463EC0B44; Sat, 07 Feb 2026 16:35:20 +0100 (CET) Date: Sat, 7 Feb 2026 16:35:20 +0100 From: Willy Tarreau To: Daniel Palmer Cc: linux@weissschuh.net, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v2 01/10] elf: Add relocation types used by nolibc Message-ID: References: <20260204124542.523567-1-daniel@thingy.jp> <20260204124542.523567-2-daniel@thingy.jp> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > --- > 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