From patchwork Mon Nov 27 14:52:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 80825 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 6CAE73858298 for ; Mon, 27 Nov 2023 14:52:26 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id E3E5E3858CD1 for ; Mon, 27 Nov 2023 14:52:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E3E5E3858CD1 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E3E5E3858CD1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.137.180 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701096731; cv=none; b=L1ilx5LcpP1n/hdG9vjdi6b1E2NStVM0qe9GKXiWPRBAVsZPPZ+aXaejhcYTecNbGdJCzuiZ7d4J1TnVCfTJV9H7kXPVwRNHAeqtazS2Hl/eAyG7H5N+ErHJSs2j9vfRYrbMrFCItlWEBbUZL6Xx8FpImBhMlIHjSMS+QG8rQ2A= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701096731; c=relaxed/simple; bh=iYMLXQCxbWKgeErSB0cuhyaRLpQ5xoS949srlbw8Rck=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=gQwYZRAteCfpSiyejjW5ENr7GRzWFR75wIhLWd0V9uvAEnA3aJuYfQ6iooDnkpwA9h/syZPC+N53g5joVPmaTsZjrQEl0X2LkxLK3qsvjoAtKLLZaRfOvd17JuictQ2YyvbeDvhzOqavSwWR2DaCbt+jvqWxdb9T9DNM8i2w5ow= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: uTwyZGHRTL2YgbJW/cnrNQ== X-CSE-MsgGUID: ges+CgPRQEmpj+BFXt8B9w== X-IronPort-AV: E=Sophos;i="6.04,231,1695715200"; d="scan'208,223";a="23795618" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 27 Nov 2023 06:52:08 -0800 IronPort-SDR: 6lkxDbZBY7ZNIFFv7FF/L8qll+wNVrl7ka+ZOp6etGGRCTupfY23AUESL4Px1FKCzjLv02knYh LNo/+YD/3ZC9GEGB4RcV2pKcYQfwjY7U1H+fCMGQXZ/POQCo11r6/rpHimWbyTRnfSgHcxWjka LJNPvl2YGLaCmuZRFlLPs4riLTFZWRPRXmwqNfqaNX/hGtlsZ/BWJ0YUdMCMCFk+Hze8vF/+m4 8M0p7ruTPIwhQKKuYTcDwOeoq2q4z2P4h6QCXLotdF3J7o30xdQVnfnoPjWMg548zI6rIW1uv4 gKQ= From: Thomas Schwinge To: Samuel Thibault , CC: Subject: hurd: Ad default-pie and static-pie support In-Reply-To: <20231028192039.kgv7sp5f7kucqvvf@begin> References: <20231028192039.kgv7sp5f7kucqvvf@begin> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Mon, 27 Nov 2023 15:52:02 +0100 Message-ID: <87jzq3s0z1.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-11.mgc.mentorg.com (139.181.222.11) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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 Hi! On 2023-10-28T21:20:39+0200, Samuel Thibault wrote: > This fixes the Hurd spec in the default-pie case, and adds static-pie > support. I understand that your change does work for you as-is, so I've now pushed that to master branch in commit c768917402d4cba69a92c737e56e177f5b8ab0df "hurd: Ad default-pie and static-pie support", see attached. Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 From c768917402d4cba69a92c737e56e177f5b8ab0df Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 6 May 2023 13:55:44 +0200 Subject: [PATCH] hurd: Ad default-pie and static-pie support This fixes the Hurd spec in the default-pie case, and adds static-pie support. gcc/ChangeLog: * config/i386/gnu.h: Use PIE_SPEC, add static-pie case. * config/i386/gnu64.h: Use PIE_SPEC, add static-pie case. --- gcc/config/i386/gnu.h | 6 +++--- gcc/config/i386/gnu64.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gcc/config/i386/gnu.h b/gcc/config/i386/gnu.h index 8dc6d9ee4e3..e776144f96c 100644 --- a/gcc/config/i386/gnu.h +++ b/gcc/config/i386/gnu.h @@ -27,12 +27,12 @@ along with GCC. If not, see . #undef STARTFILE_SPEC #if defined HAVE_LD_PIE #define STARTFILE_SPEC \ - "%{!shared: %{pg|p|profile:%{static:gcrt0.o%s;:gcrt1.o%s};pie:Scrt1.o%s;static:crt0.o%s;:crt1.o%s}} \ - crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" + "%{!shared: %{pg|p|profile:%{static-pie:grcrt0.o%s;static:gcrt0.o%s;:gcrt1.o%s};static-pie:rcrt0.o%s;static:crt0.o%s;" PIE_SPEC ":Scrt1.o%s;:crt1.o%s}} \ + crti.o%s %{static:crtbeginT.o%s;shared|static-pie|" PIE_SPEC ":crtbeginS.o%s;:crtbegin.o%s}" #else #define STARTFILE_SPEC \ "%{!shared: %{pg|p|profile:%{static:gcrt0.o%s;:gcrt1.o%s};static:crt0.o%s;:crt1.o%s}} \ - crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" + crti.o%s %{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}" #endif #ifdef TARGET_LIBC_PROVIDES_SSP diff --git a/gcc/config/i386/gnu64.h b/gcc/config/i386/gnu64.h index a411f0e802a..332372fa067 100644 --- a/gcc/config/i386/gnu64.h +++ b/gcc/config/i386/gnu64.h @@ -31,10 +31,10 @@ along with GCC. If not, see . #undef STARTFILE_SPEC #if defined HAVE_LD_PIE #define STARTFILE_SPEC \ - "%{!shared: %{pg|p|profile:%{static:gcrt0.o%s;:gcrt1.o%s};pie:Scrt1.o%s;static:crt0.o%s;:crt1.o%s}} \ - crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" + "%{!shared: %{pg|p|profile:%{static-pie:grcrt0.o%s;static:gcrt0.o%s;:gcrt1.o%s};static-pie:rcrt0.o%s;static:crt0.o%s;" PIE_SPEC ":Scrt1.o%s;:crt1.o%s}} \ + crti.o%s %{static:crtbeginT.o%s;shared|static-pie|" PIE_SPEC ":crtbeginS.o%s;:crtbegin.o%s}" #else #define STARTFILE_SPEC \ "%{!shared: %{pg|p|profile:%{static:gcrt0.o%s;:gcrt1.o%s};static:crt0.o%s;:crt1.o%s}} \ - crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" + crti.o%s %{static:crtbeginT.o%s;shared|static-pie|" PIE_SPEC ":crtbeginS.o%s;:crtbegin.o%s}" #endif -- 2.34.1