From patchwork Thu Jan 23 13:42:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Rakic X-Patchwork-Id: 105303 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A79CD3858D3C for ; Thu, 23 Jan 2025 13:53:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A79CD3858D3C Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=f1PkQBdx X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by sourceware.org (Postfix) with ESMTPS id 7D5D53858C56 for ; Thu, 23 Jan 2025 13:43:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7D5D53858C56 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7D5D53858C56 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::329 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1737639812; cv=none; b=WNhtmm2sO16wcCEsfIYaB6pTaLN4ST/k4y7oBcK14v2+sxAJeZdzx74c3nNjcrd3awWJjOBM788Gqbd4ALklcqn927lGBV8DWVxlbtHE2CkIXO8PIv1zUjJDXKINaT2xMxe2PCwwHLBmXmkoMPYfw3RzcKbmg2cI/chznHIgncU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1737639812; c=relaxed/simple; bh=EgaH/DSBkVJ4x0Ugb79/7vA91SOQigK4alSHU/TiRhw=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=iXRiGK1eTdqQCKoS+Vq+7LGtW8W15QqNdzg5uvClydv4JWMeIdybKuvpEYG7G89aqsPCai5t8uSNV3krNdqKxSFR9lNeSj5fJNIqjmnb57hFilaHLZ0g/ikG60+XUkkRksgndjeKU4qdtYqogrZG6OqGtgXB9ZC2S7zAen24qvM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7D5D53858C56 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4361aa6e517so1393535e9.2 for ; Thu, 23 Jan 2025 05:43:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737639811; x=1738244611; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=igLxu6ZKwfsZhkVfCJxDcN50bfQcx0soCh4/X+cJ2G0=; b=f1PkQBdxoV+dsozc+1Uqot8WMHXqv9EK7hCckTOMVTpafBjjqC18eCRNoJI9Fn0MWB FTJXWUgM5O2rf4asu0xwuYYMYrayZWBjUsltLmkwAlqSbWVTeG/hyFKR21/RaKWwCpvR RGFb+DLJH0PGMMhAtZygt0TgAP8ncbwCL6gZ/3xp5LgbswKRZ4Xqvy32ZvphVHvg41VX LRQGhH89Fah32Yz0B3uD1ZMjEdCq+4mn1uvvI/Eh7wT8ZxB4PSdo6Fu5bkd0S4W2Kt5A 4sj6xJKzi286fLltHWCLkZke2CO2f8VZSPVKpaOqlN1Lb80oG16V7jKe6/HBVV9IyWF6 QdcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737639811; x=1738244611; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=igLxu6ZKwfsZhkVfCJxDcN50bfQcx0soCh4/X+cJ2G0=; b=MbNsu36fNkvWGhcNWxiU7pmY7LOOBnw+7+82jtgDMOQxBLQ58DdmPyEpvQvsjCLCOJ qDV5Vb6ZGf6jSO3l4Z8v8KgbvNwfQYYHWjV+RBLxp7bwCLXBG7oyHtfw9xovHDX+e6kc hDsCHxI6TPacJBchhERknGEC7TWQ+W6Np8MUJO3Uf8Im6Bw/tyg+K5gUMpAr8+0ZS+kw Uy4MxcGRcQplJ9E1FQ02rJ3CN09LvQ2cbYbRd4Ybe/h9E4sRyKpdf3vyMeWykAbIkJ3w ItSnda5KtuWHCMHXZ6z+mR41tfsDh1Ae7dG+mDf46M7lmVrfV1xlv8fPnmmjRzdV8nXJ gc3A== X-Gm-Message-State: AOJu0YxlzdLiOQaxLyDBgybx9j1oIasTK/jyBy0aLJy1wJOaue/SZXhn SNsuoRWHOwQk6t+wiVd5gCOx18Ix5WkZkYZ8enS2TZTxQ5JxmJzE1BfeMQ== X-Gm-Gg: ASbGncvk+TMpw6THhJMHjleQ743vB66TQDC8rzZeajvO8yCZD/c1u6s2f3USUAAjFv4 b5KnyMINYmV1K0nif6d7QtAIAl4akgXkBJZOnCq0JdQj5kuVnffPT87lSpI1WtHC7ekPGhzXk/C p675DhmI4fd1S2G6WHfWECPjml2/reRUHPA9AuN57Ie1oC1M3PxXmu0IBUjtcNx9ZjazV3/TKLl heqpQvbVVG4KH2rcwz2nd31RVk8jJ47knB1CJSq7/+AKReeCFo4PCjkcjjOmkXHyYgOnrh0MFuY hX/8G4/WzzVUhpU3mlBYV9zovDrL X-Google-Smtp-Source: AGHT+IGmytugBtEGq1/bIeX6iPKJep5qES1Eqiz3+QNihexDe8xy7NOa5Lpg+YwejuYl4U/u++JdQg== X-Received: by 2002:a05:600c:1d07:b0:436:17f4:9b3d with SMTP id 5b1f17b1804b1-4389141cda7mr90734725e9.4.1737639810500; Thu, 23 Jan 2025 05:43:30 -0800 (PST) Received: from L-H2N0CV05D839062.. ([79.175.87.218]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-438b318c1a2sm64597575e9.7.2025.01.23.05.43.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jan 2025 05:43:30 -0800 (PST) From: Aleksandar Rakic X-Google-Original-From: Aleksandar Rakic To: libc-alpha@sourceware.org Cc: aleksandar.rakic@htecgroup.com, djordje.todorovic@htecgroup.com, cfu@mips.com, Andrew Bennett , Faraz Shahbazker Subject: [PATCH 03/11] Fix issues with removing no-reorder directives Date: Thu, 23 Jan 2025 14:42:59 +0100 Message-Id: <20250123134308.1785777-5-aleksandar.rakic@htecgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250123134308.1785777-1-aleksandar.rakic@htecgroup.com> References: <20250123134308.1785777-1-aleksandar.rakic@htecgroup.com> MIME-Version: 1.0 X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, KAM_STOCKGEN, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org 1. Added -O2 to the Makefile to ensure that assembly sources have their delay slots filled. 2. Also move the no-reorder directive into the PIC section of the setjmp code. Cherry-picked 4e451260675b2e54535eafc2df35d92653acd084 from https://github.com/MIPS/glibc Signed-off-by: Andrew Bennett Signed-off-by: Faraz Shahbazker Signed-off-by: Aleksandar Rakic --- sysdeps/mips/Makefile | 2 ++ sysdeps/mips/bsd-setjmp.S | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/mips/Makefile b/sysdeps/mips/Makefile index d189973aa0..17ddc2a97c 100644 --- a/sysdeps/mips/Makefile +++ b/sysdeps/mips/Makefile @@ -18,9 +18,11 @@ CPPFLAGS-crtn.S += $(pic-ccflag) endif ASFLAGS-.os += $(pic-ccflag) + # libc.a and libc_p.a must be compiled with -fPIE/-fpie for static PIE. ASFLAGS-.o += $(pie-default) ASFLAGS-.op += $(pie-default) +ASFLAGS += -O2 ifeq ($(subdir),elf) diff --git a/sysdeps/mips/bsd-setjmp.S b/sysdeps/mips/bsd-setjmp.S index 7e4d7dcb0b..8c06b9957c 100644 --- a/sysdeps/mips/bsd-setjmp.S +++ b/sysdeps/mips/bsd-setjmp.S @@ -28,8 +28,8 @@ .option pic2 #endif ENTRY (setjmp) - .set noreorder #ifdef __PIC__ + .set noreorder .cpload t9 .set reorder la t9, C_SYMBOL_NAME (__sigsetjmp)