From nobody Wed Nov 27 10:01:27 2024 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 89EA020A5F0; Fri, 11 Oct 2024 09:18:54 +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=1728638336; cv=none; b=SxzovbsQDCjSqW3vlJu9P9NTBNlgmXB0iAAtEunHuAXLw57J4T2wlWe9Utth65x0sR0Q0MjgzOtTW0yUVu8I4yyj2YlSbBqC2cqXPm+j+eNnw9WWo+4t+mBlPdCJLV2AKM2UYY1YQviXgxtqpl5gewHGJ5a/Jj0XsMcXqBBGlbg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728638336; c=relaxed/simple; bh=8graJ88b/1tuzP7zyilPImJgtI4+2y3oe5+fECRuaC4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cuES5QMSCtu8145bI/xFFUjNeetL7Mj8aJxmecdVUxY7mtVM/z0vIh8Zcsi/wBM9JwIya+kJytvii5h8eDAJcKziEsi/0xFurHiehMPmP7lhXKuyupofEQh6QxeDWPVfIcq+3ViTtN4gigBIrI3kJc8pZ+0ufZpcs1egeggZ9Bo= 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=pMItqUBA; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=HoF1+6rt; 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="pMItqUBA"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="HoF1+6rt" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1728638332; 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=WofKWQfIubfeHKDL8Z7mLX9FYWEFQjb7A3Rqqw9UA/8=; b=pMItqUBA1FGTHUAJGwjQLn8u28ELmvCCdkFJp61+T44IQEHQy66+ju6NrDUBJuj5paWP44 DDlqLPIjTe3ZR/YONfALP5fDqWR30q+BWI6oPxvifwN/K1EnqauT7SJ/Wzwos6LCdH3J93 dUJSpqzQpBYWDbgyLMQwbxhV80N8NqA63cnwzTeMOjoZPC/8RHBbxmbnnp+2nl0GVN0A7W AmSHIhIaVy/+MwcvHjJwVq6/C/iefgkWzROQhiVwLTjotScE4f7CEE2XGLkCDX+5gBaGOl Ewb6fz46k4VD8RM0BZYlR9Oseo89C2IEEr6+1c9GvtL/3mYDBDjK1dopCiz9MA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1728638332; 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=WofKWQfIubfeHKDL8Z7mLX9FYWEFQjb7A3Rqqw9UA/8=; b=HoF1+6rtA7cY8FPUyY2ENIq3BU8v1ZjnYJVrIo3MatrHGR4E19nKDGVeWzMY0exIp1C2fT UCYWjl88JJqu3jAg== Date: Fri, 11 Oct 2024 11:18:25 +0200 Subject: [PATCH 1/3] x86: vdso: Always reject undefined references in during linking 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: <20241011-vdso-checkundef-v1-1-1a46e0352d20@linutronix.de> References: <20241011-vdso-checkundef-v1-0-1a46e0352d20@linutronix.de> In-Reply-To: <20241011-vdso-checkundef-v1-0-1a46e0352d20@linutronix.de> To: Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Richard Weinberger , Anton Ivanov , Johannes Berg , "David S. Miller" , Andreas Larsson Cc: linux-kernel@vger.kernel.org, linux-um@lists.infradead.org, sparclinux@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1728638330; l=2103; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=8graJ88b/1tuzP7zyilPImJgtI4+2y3oe5+fECRuaC4=; b=QbuErtNhAAXbGdrRJr2jxflgPuO9hwjLb0cgTtUeTw+X0nZP2svxJLWcPCHmCWk1cJA1jKJ/P /VPOOwcIsHfAUDmveF3GaogL7lYf0UB7b3T4G7lZ5MxpZ4eetTYT+JB X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= Instead of using a custom script to detect and fail on undefined references, use --no-undefined for all VDSO linker invocations. Drop the now unused checkundef.sh script. Signed-off-by: Thomas Wei=C3=9Fschuh --- arch/x86/entry/vdso/Makefile | 7 +++---- arch/x86/entry/vdso/checkundef.sh | 10 ---------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile index c9216ac4fb1eb8c1e5bc5e33b41e9e40c7924cbf..99de18d88bc39f8f83f35e55402= 8efd0a76fccec 100644 --- a/arch/x86/entry/vdso/Makefile +++ b/arch/x86/entry/vdso/Makefile @@ -32,7 +32,7 @@ targets +=3D $(foreach x, 64 x32 32, vdso-image-$(x).c vd= so$(x).so vdso$(x).so.dbg =20 CPPFLAGS_vdso.lds +=3D -P -C =20 -VDSO_LDFLAGS_vdso.lds =3D -m elf_x86_64 -soname linux-vdso.so.1 --no-undef= ined \ +VDSO_LDFLAGS_vdso.lds =3D -m elf_x86_64 -soname linux-vdso.so.1 \ -z max-page-size=3D4096 =20 $(obj)/vdso64.so.dbg: $(obj)/vdso.lds $(vobjs) FORCE @@ -151,10 +151,9 @@ $(obj)/vdso32.so.dbg: $(obj)/vdso32/vdso32.lds $(vobjs= 32) FORCE quiet_cmd_vdso =3D VDSO $@ cmd_vdso =3D $(LD) -o $@ \ $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \ - -T $(filter %.lds,$^) $(filter %.o,$^) && \ - sh $(src)/checkundef.sh '$(NM)' '$@' + -T $(filter %.lds,$^) $(filter %.o,$^) =20 -VDSO_LDFLAGS =3D -shared --hash-style=3Dboth --build-id=3Dsha1 \ +VDSO_LDFLAGS =3D -shared --hash-style=3Dboth --build-id=3Dsha1 --no-undefi= ned \ $(call ld-option, --eh-frame-hdr) -Bsymbolic -z noexecstack =20 quiet_cmd_vdso_and_check =3D VDSO $@ diff --git a/arch/x86/entry/vdso/checkundef.sh b/arch/x86/entry/vdso/checku= ndef.sh deleted file mode 100755 index 7ee90a9b549da32c9c12d694215b89d08645574c..000000000000000000000000000= 0000000000000 --- a/arch/x86/entry/vdso/checkundef.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -nm=3D"$1" -file=3D"$2" -$nm "$file" | grep '^ *U' > /dev/null 2>&1 -if [ $? -eq 1 ]; then - exit 0 -else - echo "$file: undefined symbols found" >&2 - exit 1 -fi --=20 2.47.0 From nobody Wed Nov 27 10:01:27 2024 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 461DC20B1FE; Fri, 11 Oct 2024 09:18:55 +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=1728638336; cv=none; b=WMgcRH+7QnItO+cycf6XR6vqWidO/vWUDRq2OiQSZDRDYNmYhqckBz+46fmo4zrIETJsORcjPToN3j8WT6mMOLv8vVdVT2qrsPOuqSfaZSJ9kG7EGv1Jmd3hKcRt7jVU7y4YFvfL58NIrwrdZ/rPazS5p7aJ/mXx5eCHoo9nIVc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728638336; c=relaxed/simple; bh=4nsH7iUaC1vNnWJLnteSYFDSKO+10nuui0NbMwzEzIs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XOm8tGx8UgN1mkYtegEbfnrlNCF+J56hY22CbRE8fw+k8gYs0s9hQTcZ/bgDL3iZgeB5RJveHgMUi1aROI5rsvO7iCnpIuklzxiipwLQ8tvzaOWq66tI1qzfPxWxgz1sHJbC+rV37SuipdLsY3bjswUREGknPhts53BeQI6XBLo= 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=qV61jMqt; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=AH/LVh1s; 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="qV61jMqt"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="AH/LVh1s" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1728638333; 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=OOVgHJWb8aIu8nsLafcNeHRtNCU+jcBKUUidMTXtnX8=; b=qV61jMqt1rbSXMy8nrB0deuV3ixLNQ6r/kkW0phr5qiZK6cbPaWQBEMZKFud1Cj14vYfjc 09x41BGu3YfYG+03oiHkiqy1pTRWD8Vt8J6iybrqFIekk9UcyQXOTmRk1nggMQ/242E98+ dK1RYGdBRW+xUrrqb7bNXm8mFf1tM5d3xEneXgCbe/L/ZYwuAo0W8AxfuDSKq9k0A80kuK eIYEPFU6RYkabtLAesczh3oA7YF8xDYlRr8nz2ZtfoTIyKq0fsLKNY1GdT7VyvuIV2hUM6 4sLiofZkT+8pIiLK+Y1CwvBaWL5R9nyBQkbaCd0jYtRGcA+ZtlNTHwAEX2N4Gg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1728638333; 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=OOVgHJWb8aIu8nsLafcNeHRtNCU+jcBKUUidMTXtnX8=; b=AH/LVh1sjzAFjZVwPqws2qdH0dvDy2IDOxCiGMLgJDjAQdYO9m1sHYu/NTnx0yP9Wb9lnz 5aaCW1OlFDgukBAg== Date: Fri, 11 Oct 2024 11:18:26 +0200 Subject: [PATCH 2/3] um: vdso: Always reject undefined references in during linking 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: <20241011-vdso-checkundef-v1-2-1a46e0352d20@linutronix.de> References: <20241011-vdso-checkundef-v1-0-1a46e0352d20@linutronix.de> In-Reply-To: <20241011-vdso-checkundef-v1-0-1a46e0352d20@linutronix.de> To: Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Richard Weinberger , Anton Ivanov , Johannes Berg , "David S. Miller" , Andreas Larsson Cc: linux-kernel@vger.kernel.org, linux-um@lists.infradead.org, sparclinux@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1728638330; l=1685; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=4nsH7iUaC1vNnWJLnteSYFDSKO+10nuui0NbMwzEzIs=; b=mRjvoxyz1Kbnltp6CHWtfEnNKzNvxFmhTwBwSDK6FK+FYQokpv6ZbWdD75ppr6tcxEJ9TIPc8 KYz8CU9O2sGCdeBgVQdjMKxdtyI2OyOIfg4niB1NRuUzk9EG00M7NWF X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= Instead of using a custom script to detect and fail on undefined references, use --no-undefined for all VDSO linker invocations. Drop the now unused checkundef.sh script. Signed-off-by: Thomas Wei=C3=9Fschuh --- arch/x86/um/vdso/Makefile | 5 ++--- arch/x86/um/vdso/checkundef.sh | 11 ----------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/arch/x86/um/vdso/Makefile b/arch/x86/um/vdso/Makefile index 6a77ea6434ffde178d07b4466ec18ca83718baae..7478d11dacb713384655ed76af3= b469aeb5bae81 100644 --- a/arch/x86/um/vdso/Makefile +++ b/arch/x86/um/vdso/Makefile @@ -56,7 +56,6 @@ CFLAGS_REMOVE_um_vdso.o =3D -pg -fprofile-arcs -ftest-cov= erage quiet_cmd_vdso =3D VDSO $@ cmd_vdso =3D $(CC) -nostdlib -o $@ \ $(CC_FLAGS_LTO) $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^= F))) \ - -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) && \ - sh $(src)/checkundef.sh '$(NM)' '$@' + -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) =20 -VDSO_LDFLAGS =3D -fPIC -shared -Wl,--hash-style=3Dsysv -z noexecstack +VDSO_LDFLAGS =3D -fPIC -shared -Wl,--hash-style=3Dsysv -z noexecstack -Wl,= --no-undefined diff --git a/arch/x86/um/vdso/checkundef.sh b/arch/x86/um/vdso/checkundef.sh deleted file mode 100644 index 8e3ea6bb956fc8fead5e280bf82a52287d1328a4..000000000000000000000000000= 0000000000000 --- a/arch/x86/um/vdso/checkundef.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# SPDX-License-Identifier: GPL-2.0 -nm=3D"$1" -file=3D"$2" -$nm "$file" | grep '^ *U' > /dev/null 2>&1 -if [ $? -eq 1 ]; then - exit 0 -else - echo "$file: undefined symbols found" >&2 - exit 1 -fi --=20 2.47.0 From nobody Wed Nov 27 10:01:27 2024 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 D437D20CCD9; Fri, 11 Oct 2024 09:18:55 +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=1728638337; cv=none; b=Ri1nTJs71RcnsvGv4ILuAr1mQW9tTi4rkL0SYen8/jVvBYm5QPY9mvv79+LT7pZ2mTiHi+YJY0XEe0EYXvz0/NPepB8Z/cT/xIcU8Q9QC8bSSWMreCIlJ79ZeSNgH4sosZCOc9M7IXTHaLdZsZRIQxtwFcU3pHENXcRAkI05Z38= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728638337; c=relaxed/simple; bh=t1AATzKotfQo47rXCJvuPRI3mhX3sXVhtvZQtdB1CqY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UIKvVDskW/EmPaqeNHdK1CPHvkw4xjt5qZc+LBPb6z+YWc9+ydSmmRbQtBzXx+b2hmpeup+RmwV58yKa3a45Oe/X8oWlpLS5GU+FH2fgfdPkFk+xq6a6emz8dpHIm3ozL6N+v0CmkgZEt4BhTfUj5lfnZAL18OyGQG0zZJIypsY= 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=Azdsz7gp; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=YQaX3Xlr; 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="Azdsz7gp"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="YQaX3Xlr" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1728638334; 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=kg9B8PQ0+lOyKlgoz+gQ2Jyp4iAe3qYLBwLYXFt7qs0=; b=Azdsz7gpKjh7+LH3mmcClME+4j4GCUx//ySNzUyPGieMaTYeqheWB33EJDWCkOeeBClFDm 8mOtiBEbKplTI0DloFBIinFll7YGD9/dT0Q9M5pulKs2dnG78hi0QmLb1fMYubVEtZGRJT gGgOD9fbCSAcjGXVCOyHHfbo09Dk5ovcf0hYSa3sVWeuqp4qK5+jhqeyLp8Vt0jnjJ5bwM TMfPzOKaxy8w3jZ/aEzgXRqRDblylw6SFQpvBnPfFfI5fDepGyjV6LAIf0x6JXFq1cQe1M OPkpTYJKswVzifW6e6QqjabKbojAtbjwJKTo1xb+Z+DQUFypYwwmgPY3Qt2uhQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1728638334; 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=kg9B8PQ0+lOyKlgoz+gQ2Jyp4iAe3qYLBwLYXFt7qs0=; b=YQaX3Xlru3m2t43QFH8dxz9o9eqAXcWc9oghCmk2YfnucKpAh7+poULkH5OfFCtT9vyvzz VDKp96rMH+UNZwDg== Date: Fri, 11 Oct 2024 11:18:27 +0200 Subject: [PATCH 3/3] sparc: vdso: Always reject undefined references in during linking 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: <20241011-vdso-checkundef-v1-3-1a46e0352d20@linutronix.de> References: <20241011-vdso-checkundef-v1-0-1a46e0352d20@linutronix.de> In-Reply-To: <20241011-vdso-checkundef-v1-0-1a46e0352d20@linutronix.de> To: Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Richard Weinberger , Anton Ivanov , Johannes Berg , "David S. Miller" , Andreas Larsson Cc: linux-kernel@vger.kernel.org, linux-um@lists.infradead.org, sparclinux@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1728638330; l=1993; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=t1AATzKotfQo47rXCJvuPRI3mhX3sXVhtvZQtdB1CqY=; b=Eek2fn25N6T9f+HSgVJC+e6+MNtLYV0HzJLw9/OPZ6RC3lZPRES2yGQNKYH1dSHp0sTu22Efm FMeeW9L9LMaAoXuDSKNNdJyDRYrCSWkAh0TVYmUhGvPBbu7ddYKiO8y X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= Instead of using a custom script to detect and fail on undefined references, use --no-undefined for all VDSO linker invocations. Drop the now unused checkundef.sh script. Signed-off-by: Thomas Wei=C3=9Fschuh --- arch/sparc/vdso/Makefile | 7 +++---- arch/sparc/vdso/checkundef.sh | 10 ---------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/arch/sparc/vdso/Makefile b/arch/sparc/vdso/Makefile index 243dbfc4609d804fc221c3591eebe891107ffdab..c7697884975ea09ccb9bda1e42d= 2f9f09f23fc49 100644 --- a/arch/sparc/vdso/Makefile +++ b/arch/sparc/vdso/Makefile @@ -22,7 +22,7 @@ targets +=3D $(foreach x, 32 64, vdso-image-$(x).c vdso$(= x).so vdso$(x).so.dbg) =20 CPPFLAGS_vdso.lds +=3D -P -C =20 -VDSO_LDFLAGS_vdso.lds =3D -m elf64_sparc -soname linux-vdso.so.1 --no-unde= fined \ +VDSO_LDFLAGS_vdso.lds =3D -m elf64_sparc -soname linux-vdso.so.1 \ -z max-page-size=3D8192 =20 $(obj)/vdso64.so.dbg: $(obj)/vdso.lds $(vobjs) FORCE @@ -101,7 +101,6 @@ $(obj)/vdso32.so.dbg: FORCE \ quiet_cmd_vdso =3D VDSO $@ cmd_vdso =3D $(LD) -nostdlib -o $@ \ $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \ - -T $(filter %.lds,$^) $(filter %.o,$^) && \ - sh $(src)/checkundef.sh '$(OBJDUMP)' '$@' + -T $(filter %.lds,$^) $(filter %.o,$^) =20 -VDSO_LDFLAGS =3D -shared --hash-style=3Dboth --build-id=3Dsha1 -Bsymbolic +VDSO_LDFLAGS =3D -shared --hash-style=3Dboth --build-id=3Dsha1 -Bsymbolic = --no-undefined diff --git a/arch/sparc/vdso/checkundef.sh b/arch/sparc/vdso/checkundef.sh deleted file mode 100644 index 2d85876ffc32519ab8a0702917fedd31293cd9da..000000000000000000000000000= 0000000000000 --- a/arch/sparc/vdso/checkundef.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -objdump=3D"$1" -file=3D"$2" -$objdump -t "$file" | grep '*UUND*' | grep -v '#scratch' > /dev/null 2>&1 -if [ $? -eq 1 ]; then - exit 0 -else - echo "$file: undefined symbols found" >&2 - exit 1 -fi --=20 2.47.0