From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by sourceware.org (Postfix) with ESMTPS id EECCD3858C56 for ; Wed, 2 Nov 2022 18:18:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EECCD3858C56 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=foss.st.com Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2A2FWeIb029217; Wed, 2 Nov 2022 19:18:54 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=PeQCY6ySGdOhjUwWUVxdXcdJuV6Lz3YaRezht0u2tng=; b=cECLvLqOnS1QeyVk5n+qTpB9LbmICE9NyhjKc74/okSxa06gTFu8iFiEwKllYgCx5Pwj GxluX09pTcUKYZB9IautM2oOl09QSxHSOf6v6BNeOZ+7HlxLN3+6DnIeOIAoxJUdpL6D Etxck4MZ+PcwNZLeKnAV55uemeRYhAIXpO4vL1O+/K35Jf9iWqRLl+nVdGxsnO194wgH wsXX6k9cj9v3kpHrTSh5rz28B50pZ2dXall/L4cpQ9uzSBoH29rdCUkh9HN00f81xkDT dZXBsOVii3RsblLWcTKlcAY37xaki5xlzrdsku1d4a/1U4aiYGWckFAHeXZBPcFU9Elx BQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3kkqfhagq1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Nov 2022 19:18:54 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id CEEE110002A; Wed, 2 Nov 2022 19:18:49 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id C797D233C70; Wed, 2 Nov 2022 19:18:49 +0100 (CET) Received: from [10.252.13.210] (10.252.13.210) by SHFDAG1NODE3.st.com (10.75.129.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 2 Nov 2022 19:18:49 +0100 Message-ID: Date: Wed, 2 Nov 2022 19:18:48 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: PING^1 [PATCH] arm: Allow to override location of .gnu.sgstubs section Content-Language: en-US To: CC: References: <20221019094214.1734353-1-torbjorn.svensson@foss.st.com> From: Torbjorn SVENSSON In-Reply-To: <20221019094214.1734353-1-torbjorn.svensson@foss.st.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.252.13.210] X-ClientProxiedBy: EQNCAS1NODE4.st.com (10.75.129.82) To SHFDAG1NODE3.st.com (10.75.129.71) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-02_14,2022-11-02_01,2022-06-22_01 X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_LOW,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 List-Id: Hi, Ping, https://gcc.gnu.org/pipermail/gcc-patches/2022-October/603878.html Kind regards, Torbjörn On 2022-10-19 11:42, Torbjörn SVENSSON wrote: > Depending on the DejaGNU board definition, the .gnu.sgstubs section > might be placed on different locations in order to suite the target. > With this patch, the start location of the section is overrideable > from the board definition with the fallback of the previously > hardcoded location. > > gcc/testsuite/ChangeLog: > > * gcc.target/arm/cmse/bitfield-1.c: Use overridable location. > * gcc.target/arm/cmse/bitfield-2.c: Likewise. > * gcc.target/arm/cmse/bitfield-3.c: Likewise. > * gcc.target/arm/cmse/cmse-20.c: Likewise. > * gcc.target/arm/cmse/struct-1.c: Likewise. > * gcc.target/arm/cmse/cmse.exp (cmse_sgstubs): New. > > Signed-off-by: Torbjörn SVENSSON > --- > gcc/testsuite/gcc.target/arm/cmse/bitfield-1.c | 2 +- > gcc/testsuite/gcc.target/arm/cmse/bitfield-2.c | 2 +- > gcc/testsuite/gcc.target/arm/cmse/bitfield-3.c | 2 +- > gcc/testsuite/gcc.target/arm/cmse/cmse-20.c | 2 +- > gcc/testsuite/gcc.target/arm/cmse/cmse.exp | 11 +++++++++++ > gcc/testsuite/gcc.target/arm/cmse/struct-1.c | 2 +- > 6 files changed, 16 insertions(+), 5 deletions(-) > > diff --git a/gcc/testsuite/gcc.target/arm/cmse/bitfield-1.c b/gcc/testsuite/gcc.target/arm/cmse/bitfield-1.c > index 5685f744435..c1221bef29f 100644 > --- a/gcc/testsuite/gcc.target/arm/cmse/bitfield-1.c > +++ b/gcc/testsuite/gcc.target/arm/cmse/bitfield-1.c > @@ -1,5 +1,5 @@ > /* This test is executed only if the execution engine supports CMSE instructions. */ > -/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x00400000" } */ > +/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=[cmse_sgstubs]" } */ > > typedef struct > { > diff --git a/gcc/testsuite/gcc.target/arm/cmse/bitfield-2.c b/gcc/testsuite/gcc.target/arm/cmse/bitfield-2.c > index 7a794d44644..79e9a3efc93 100644 > --- a/gcc/testsuite/gcc.target/arm/cmse/bitfield-2.c > +++ b/gcc/testsuite/gcc.target/arm/cmse/bitfield-2.c > @@ -1,5 +1,5 @@ > /* This test is executed only if the execution engine supports CMSE instructions. */ > -/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x00400000" } */ > +/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=[cmse_sgstubs]" } */ > > typedef struct > { > diff --git a/gcc/testsuite/gcc.target/arm/cmse/bitfield-3.c b/gcc/testsuite/gcc.target/arm/cmse/bitfield-3.c > index 5875f8dff48..d621a802ee1 100644 > --- a/gcc/testsuite/gcc.target/arm/cmse/bitfield-3.c > +++ b/gcc/testsuite/gcc.target/arm/cmse/bitfield-3.c > @@ -1,5 +1,5 @@ > /* This test is executed only if the execution engine supports CMSE instructions. */ > -/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x00400000" } */ > +/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=[cmse_sgstubs]" } */ > > typedef struct > { > diff --git a/gcc/testsuite/gcc.target/arm/cmse/cmse-20.c b/gcc/testsuite/gcc.target/arm/cmse/cmse-20.c > index 08e89bff637..bbea9358870 100644 > --- a/gcc/testsuite/gcc.target/arm/cmse/cmse-20.c > +++ b/gcc/testsuite/gcc.target/arm/cmse/cmse-20.c > @@ -1,5 +1,5 @@ > /* This test is executed only if the execution engine supports CMSE instructions. */ > -/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x00400000" } */ > +/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=[cmse_sgstubs]" } */ > > #include > #include > diff --git a/gcc/testsuite/gcc.target/arm/cmse/cmse.exp b/gcc/testsuite/gcc.target/arm/cmse/cmse.exp > index 436dd71ef89..1df5d56c6d5 100644 > --- a/gcc/testsuite/gcc.target/arm/cmse/cmse.exp > +++ b/gcc/testsuite/gcc.target/arm/cmse/cmse.exp > @@ -44,6 +44,17 @@ if {[is-effective-target arm_cmse_hw]} then { > set saved-lto_torture_options ${LTO_TORTURE_OPTIONS} > set LTO_TORTURE_OPTIONS "" > > +# Return the start address of the .gnu.sgstubs section. > +proc cmse_sgstubs {} { > + # Allow to override the location of .gnu.sgstubs section. > + set tboard [target_info name] > + if {[board_info $tboard exists cmse_sgstubs]} { > + return [board_info $tboard cmse_sgstubs] > + } > + > + return "0x00400000" > +} > + > # These are for both baseline and mainline. > gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] \ > "" $DEFAULT_CFLAGS > diff --git a/gcc/testsuite/gcc.target/arm/cmse/struct-1.c b/gcc/testsuite/gcc.target/arm/cmse/struct-1.c > index 75a99f487e7..bebd059b13f 100644 > --- a/gcc/testsuite/gcc.target/arm/cmse/struct-1.c > +++ b/gcc/testsuite/gcc.target/arm/cmse/struct-1.c > @@ -1,5 +1,5 @@ > /* This test is executed only if the execution engine supports CMSE instructions. */ > -/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x00400000" } */ > +/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=[cmse_sgstubs]" } */ > > typedef struct > {