From nobody Thu Oct 2 12:06:48 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 3BDA72FBDF1; Wed, 17 Sep 2025 14:02:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758117750; cv=none; b=iFyP8vC2MnLwf+pMVw8czW+3ItGUPUnOKu7fao+liGIHASNEokA9ujXk7mBEdCOtscGRT42jGxO0tf8aqTuHdd/cooC7AgxbgHUaAGUJzLWZGlYMy+mOmmeEA6CzRFPEhY87rFNJY0wlC5jVCz9p7awN/4wuV7ChkxPWAokAyPA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758117750; c=relaxed/simple; bh=f4Pm1iBT2Cenk83Qq5TMSPoB/nyvwI1MW2gyBUgiLI8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ozrupfag3B2yVYRvn3HwMqbm9H8jT2AFROtYgLsUV5I8db9SDJUyfSXzvDFsYES00otYLeCYD5CScXhP8AqrjPkgzlki+Trh0KpNBUBTJvN2x6+GafGJ4KHCQjRpPTAOzV3ts36NwCarnUvKMu7xXXriHTFojksu66HG9whnZBo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=C2hNNsVq; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=wnVKE+KA; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="C2hNNsVq"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="wnVKE+KA" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1758117733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nLpJbJ4yoSDtOyQiA+uk/p+kb6cMa3lf/boDCjBlWz0=; b=C2hNNsVqqkQiPoKIVDBS8x6lJTa7oMQ5k7D54u/aSw0FQhCfWy88IPfH5gAYHCS48ThkUI G3YqbX1xx52uMBKKgkYP2g5kq5fNG317gyPlBRT5goPXv08bV8RLgmRl/8jCqG0d0Avl8u 4O7TL/BkD1rzW4t2v+LJIyi3rmNAIdIjN1RPup4TsoDtssTg7n1DhSOgnpLLHIKed3sZ+j kglKfJml/6HsJqzXUHJW8/W/eH5ObUaBiXR5Re8lFFFIcmmk9xU2upS1RnUYXLFlwwgjki I/voIzq8wZ/vdCr9nCI2EkZbh6h4BpOxN3ZL40MaGmAWPn5iSmsMSe7aPciB9w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1758117733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nLpJbJ4yoSDtOyQiA+uk/p+kb6cMa3lf/boDCjBlWz0=; b=wnVKE+KAnGIthJrBQSLwmmIME+YarESmoquyXQaRTd5T5xZk8Imo8IPrYwt/wz017Q8Y2G RaSQS3JUShhRTaCA== Date: Wed, 17 Sep 2025 16:00:35 +0200 Subject: [PATCH v3 33/36] sparc64: vdso2c: Remove symbol handling 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250917-vdso-sparc64-generic-2-v3-33-3679b1bc8ee8@linutronix.de> References: <20250917-vdso-sparc64-generic-2-v3-0-3679b1bc8ee8@linutronix.de> In-Reply-To: <20250917-vdso-sparc64-generic-2-v3-0-3679b1bc8ee8@linutronix.de> To: Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Arnd Bergmann , "David S. Miller" , Andreas Larsson , Nick Alcock , John Stultz , Stephen Boyd , John Paul Adrian Glaubitz , Shuah Khan , Catalin Marinas , Will Deacon , Theodore Ts'o , "Jason A. Donenfeld" , Russell King , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Huacai Chen , WANG Xuerui , Thomas Bogendoerfer , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Nagarathnam Muthusamy , Shannon Nelson Cc: linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linux-s390@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1758117712; l=3432; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=f4Pm1iBT2Cenk83Qq5TMSPoB/nyvwI1MW2gyBUgiLI8=; b=iOxuwiA/r72lhmby60u7A4UBDBHyoBd3lZHvKp5Musv9OqhM+XOtOYu/NMYLRg9yWtjwVKTwU 4dtaCO+ChNYA7+JM0i3GBx0znVTFNzjSomyEWYUXHxkYlBzJ3ajEJpv X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= There are no handled symbols left. Signed-off-by: Thomas Wei=C3=9Fschuh --- arch/sparc/vdso/vdso2c.c | 10 ---------- arch/sparc/vdso/vdso2c.h | 41 +---------------------------------------- 2 files changed, 1 insertion(+), 50 deletions(-) diff --git a/arch/sparc/vdso/vdso2c.c b/arch/sparc/vdso/vdso2c.c index 70b14a436fe2297ab446f778ab0d43155c272421..e5c61214a0e285547ac57c99975= 42546464bde23 100644 --- a/arch/sparc/vdso/vdso2c.c +++ b/arch/sparc/vdso/vdso2c.c @@ -58,14 +58,6 @@ =20 const char *outfilename; =20 -struct vdso_sym { - const char *name; - int export; -}; - -struct vdso_sym required_syms[] =3D { -}; - __attribute__((format(printf, 1, 2))) __attribute__((noreturn)) static void fail(const char *format, ...) { @@ -105,8 +97,6 @@ static void fail(const char *format, ...) #define PUT_BE(x, val) \ PBE(x, val, 64, PBE(x, val, 32, PBE(x, val, 16, LAST_PBE(x, val)))) =20 -#define NSYMS ARRAY_SIZE(required_syms) - #define BITSFUNC3(name, bits, suffix) name##bits##suffix #define BITSFUNC2(name, bits, suffix) BITSFUNC3(name, bits, suffix) #define BITSFUNC(name) BITSFUNC2(name, ELF_BITS, ) diff --git a/arch/sparc/vdso/vdso2c.h b/arch/sparc/vdso/vdso2c.h index ba0794659eb5af53b8c86b24f3221a5d0b3f74ab..bad6a0593f4ca293feca201a634= 3833268ad1cb8 100644 --- a/arch/sparc/vdso/vdso2c.h +++ b/arch/sparc/vdso/vdso2c.h @@ -17,11 +17,9 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len, unsigned long mapping_size; int i; unsigned long j; - ELF(Shdr) *symtab_hdr =3D NULL, *strtab_hdr; + ELF(Shdr) *symtab_hdr =3D NULL; ELF(Ehdr) *hdr =3D (ELF(Ehdr) *)raw_addr; ELF(Dyn) *dyn =3D 0, *dyn_end =3D 0; - INT_BITS syms[NSYMS] =3D {}; - ELF(Phdr) *pt =3D (ELF(Phdr) *)(raw_addr + GET_BE(&hdr->e_phoff)); =20 /* Walk the segment table. */ @@ -72,38 +70,6 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len, if (!symtab_hdr) fail("no symbol table\n"); =20 - strtab_hdr =3D raw_addr + GET_BE(&hdr->e_shoff) + - GET_BE(&hdr->e_shentsize) * GET_BE(&symtab_hdr->sh_link); - - /* Walk the symbol table */ - for (i =3D 0; - i < GET_BE(&symtab_hdr->sh_size) / GET_BE(&symtab_hdr->sh_entsize); - i++) { - int k; - - ELF(Sym) *sym =3D raw_addr + GET_BE(&symtab_hdr->sh_offset) + - GET_BE(&symtab_hdr->sh_entsize) * i; - const char *name =3D raw_addr + GET_BE(&strtab_hdr->sh_offset) + - GET_BE(&sym->st_name); - - for (k =3D 0; k < NSYMS; k++) { - if (!strcmp(name, required_syms[k].name)) { - if (syms[k]) { - fail("duplicate symbol %s\n", - required_syms[k].name); - } - - /* - * Careful: we use negative addresses, but - * st_value is unsigned, so we rely - * on syms[k] being a signed type of the - * correct width. - */ - syms[k] =3D GET_BE(&sym->st_value); - } - } - } - if (!name) { fwrite(stripped_addr, stripped_len, 1, outfile); return; @@ -129,10 +95,5 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len, fprintf(outfile, "const struct vdso_image %s_builtin =3D {\n", name); fprintf(outfile, "\t.data =3D raw_data,\n"); fprintf(outfile, "\t.size =3D %lu,\n", mapping_size); - for (i =3D 0; i < NSYMS; i++) { - if (required_syms[i].export && syms[i]) - fprintf(outfile, "\t.sym_%s =3D %" PRIi64 ",\n", - required_syms[i].name, (int64_t)syms[i]); - } fprintf(outfile, "};\n"); } --=20 2.51.0