From patchwork Mon Jan 6 13:01:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stafford Horne X-Patchwork-Id: 104169 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 DDE3E3857C7B for ; Mon, 6 Jan 2025 13:02:04 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by sourceware.org (Postfix) with ESMTPS id D87FF3858D29 for ; Mon, 6 Jan 2025 13:01:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D87FF3858D29 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 D87FF3858D29 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1736168494; cv=none; b=CD6JGV1m0pJY92u5p0i6aSIHMGHhU/SGm/5327x0pIZDIg/NEZQG4tc8oX4xZGP6iwjul97B/0eUsSGUvWXplls5xdJePB73cKN+3/THKwG9v9+zCiUc595dVharjbBjDIeXrUMfIZvMseFhxpr+lmMVNN/Uuh4Xb4Ss+6HIXYY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1736168494; c=relaxed/simple; bh=wTfMFHqejdyMqF7T3PCgetw79DKiWCEzG/hRrSC9K2Y=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=EcSxXtAMIYPfXOhrxAwYRV2B0iUJfM/W7gIaH/hugW7iGaB5kHFUXKH/58hfWcK+ebPRTwgOAlYvGgoFn3p+BUuvJG8s9RBWsUvi3wOkJFLhx39R0Ob1xPrPNiwDuumce/qLr+7X7DDjSHovgLT0zRE31c96LMD69r5t/dBCXTE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4361fe642ddso150410325e9.2 for ; Mon, 06 Jan 2025 05:01:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736168492; x=1736773292; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=/Mk+JzD7LuFMEpDTdDcsmHlJ7HrXGvotCwnVeQEKBd8=; b=DO8qzeiBDAO0UDcJ+wpsr9BF4iHZjggqGRSLMBQ5ptJMMbHtgw4+bK9zXgjB7j1Hn3 wBRR3gREiAK1Tm+1ud4kjQrmgpmlFvpk5sMXyKuPr39FvFbXs6sa/7/lrh9zX45nim8A P5Xw9x6JHlNK2ISVyeJ/2aJbj7TpaitxKYNG/5Ab/KnCazugEGcX0BEZFPsTuQ8ddIfT CsST3lvHlJicOMmsrOHVsbX5JWBQhZiwRoGzEsyiDURX5bVVw/ahSM/WcAISvyYbyW0L A2IsqH67s/aiDKfUODHciQE6ZZ+6H9YX6RV/wY7cQP9a+XC5+WMJ0oXAB63I2GUjsTpB g7ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736168492; x=1736773292; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/Mk+JzD7LuFMEpDTdDcsmHlJ7HrXGvotCwnVeQEKBd8=; b=vnoXxSr80cUhqzzC7mFHovQ65ZKzsqVvWt2Sxn8yLDCjz9K4+z6i/rzXTaeie3Vrec AXaMvizTV+3FLzZgXxhD3dGuJydw7/Y334UFQWhAHk1ZdkOHsHhFyrYwf/JSQBjf2EqD NdMGEjOoVgGXj4AGBkwbf7OqkJNE8cCl7VNBdc1AWH3XUWwFit0RO65J0thCb7o1+ZBd Fnbj3oqFpXiOJOvme77JV+fs8199HBgNQ9dvznkkYHr8yTu8JralMNr/+/2zChclpFCG 32NMIBp04i2uiH0R3aCT2dSf815/OsmpPj1NXf12FrjAjLFQqXbTfnYCZQdJ8eJgVwyC es7A== X-Gm-Message-State: AOJu0YzjU1swWxPdMYoC5KfG/bRUGn3ASv53lTW0qqOMl6uXK3N98eUG e43RyahHBFuB8Us3It0+Ro22bqEttAp8qBsQf3kicDQpx5lZhCzxm/J/vQ== X-Gm-Gg: ASbGncsupBZTHCnFq/FQ4t9CTeTQQSHER0t5nQ861BKkDAZZ7SLE/dHURbKxMO4pJ6B +RgFnWRBPtT1aqVzq5NTGWGAa5KY3wb1XuvMkFApev6p12jdUx+oc3TgqsOHM6zzbeWmX4+uk1e B9ocCzE9uuWZoofqq5KLISV5lKDch1rHONuKtB1E2+7pZoHFSIjQ4sDmIhhn2fg6m56rsGzcqEQ XadoadSQbWdRJ9iLC/ER2Np77BcbBk3eSNRWCNEYs1Xxae361gN/xcoMHUXhfgoXn0bGgOxHIbu xynvTrUGto9VXWzefgKv X-Google-Smtp-Source: AGHT+IHIEfxyi0Zojkaoz5KClwLmZ/3MEKk+5hziIZDuQwVAHpmTHbdMm5+igGLO4rJs8DEVcgU7mw== X-Received: by 2002:a05:600c:3b23:b0:436:4708:9fb6 with SMTP id 5b1f17b1804b1-43668b5e02dmr430317715e9.20.1736168491033; Mon, 06 Jan 2025 05:01:31 -0800 (PST) Received: from localhost (cpc1-brnt4-2-0-cust862.4-2.cable.virginm.net. [86.9.131.95]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b4274csm603821645e9.38.2025.01.06.05.01.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2025 05:01:29 -0800 (PST) From: Stafford Horne To: GCC patches Cc: Linux OpenRISC , Stafford Horne Subject: [PATCH] or1k: add .note.GNU-stack section on linux Date: Mon, 6 Jan 2025 13:01:17 +0000 Message-ID: <20250106130117.1230925-1-shorne@gmail.com> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_SHORT, 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org In the OpenRISC build we get the following warning: ld: warning: __modsi3_s.o: missing .note.GNU-stack section implies executable stack ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker Fix this by adding a .note.GNU-stack to indicate the stack does not need to be executable for the lib1funcs. Note, this is also needed for the upcoming glibc 2.41. libgcc/ * config/or1k/lib1funcs.S: Add .note.GNU-stack section on linux. --- libgcc/config/or1k/lib1funcs.S | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libgcc/config/or1k/lib1funcs.S b/libgcc/config/or1k/lib1funcs.S index 0c2ec5fc8c4..8f7266bedb9 100644 --- a/libgcc/config/or1k/lib1funcs.S +++ b/libgcc/config/or1k/lib1funcs.S @@ -19,6 +19,11 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +/* An executable stack is *not* required for these functions. */ +#ifdef __linux__ +.section .note.GNU-stack,"",%progbits +.previous +#endif #ifdef L__mulsi3 .balign 4