From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (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 87EFC1A83F9 for ; Mon, 16 Feb 2026 20:33:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771274025; cv=none; b=r7uUGogBzEaivvcylxIo5CRYMm8x7XjD5YhrDHjHeuZEiRO81IB1I/dac8nPBNffT36F0T7Ur3laePKeODkmhyTgafUzIO8AQBlubrCAZZc0pkXAkYrPWVmSi2oYhtbEO6uNwAyJxLePlAXJnrlVHM6KoqIiXAvkNZblHWpCmuY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771274025; c=relaxed/simple; bh=bsuDqkH+ClmuZj9PzUoeAtxVXJBe6P3nWnQaZzZwTmg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VaBmxiErYZqCBvHVYuvwEMmAxLjwCc6TA2cV/7QmlkUTx4G83WqbzGJydwNiqWbd8Bb15rGGGPlmyhfoSmzszzX9go+b3MByMHpLW2T+cde4JPQMmOuIrgLwhBySS9NXQgZHMMcyG1Tlc1SIv0BI3KP8XdaAQzQ8XLh7y/Z/KXg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=rW8vQH9Z; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="rW8vQH9Z" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1771274022; bh=bsuDqkH+ClmuZj9PzUoeAtxVXJBe6P3nWnQaZzZwTmg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rW8vQH9ZAXZmn6I1L8mWZcKIi9/SWXuaZTFxwU17s5Kj3ZOIOB+jeHDHEAOqXGmST yIGQexrM7Jz1v7w2CK54pOwnF5ny3hkwx2KipcKdnE7nCAP1XSrmhwttm8Gc6vd3IN rx2JBg0vKi1Ga5ndQquyiM6wAgEVmY6rPJaCaFHs= Date: Mon, 16 Feb 2026 21:33:42 +0100 From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Daniel Palmer Cc: w@1wt.eu, 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 2026-02-04 21:45:33+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. For the final version of this patch the UAPI headers will need all relocation types for all architectures. Otherwise the kernel build will break. I can do this migration, as I'll need it for some other things anyways. Could you add a comment to this effect to the patch? > > 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 > + > +#endif /* _LINUX_ELF_R_H */ > diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h > index 819ded2d39de..3d18543d5460 100644 > --- a/include/uapi/linux/elf.h > +++ b/include/uapi/linux/elf.h > @@ -4,6 +4,7 @@ > > #include > #include > +#include > > /* 32-bit ELF base types. */ > typedef __u32 Elf32_Addr;