From patchwork Tue Jul 2 14:41:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 168327 Delivered-To: patch@linaro.org Received: by 2002:ac9:6410:0:0:0:0:0 with SMTP id r16csp3997760ock; Tue, 2 Jul 2019 07:42:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrK7hUvc/StsgZfe03s1pVBiMw/yn1RLdMbZY5pSMrBSzkjyZYW23hzPzDTT5jwCsQKKfu X-Received: by 2002:a65:4347:: with SMTP id k7mr31440642pgq.253.1562078543213; Tue, 02 Jul 2019 07:42:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562078543; cv=none; d=google.com; s=arc-20160816; b=jsyqenqN14lgUZynyPlRx8ZBbJYol05bCK9e/sKD7jw2xc+CB0EwnSPDKYOpMRcl27 4xV3kC3+lq8QlX7GqtrMwCzHmmbJVAzxX5le8Z99PxOxq963TCc/UtDgJ6M0cYS3ipa1 IDCxp9jDVoKJbubYUfjQyOzOFh0TV2OiXC0baHU/m8f8TGo0dJKcTsQE3inGHIxUP2Wp D1tt+q9TukNlzTIizv8m42r+dQbrtjVInLlp56EQYui3djZNTZElvNMGOyyBmUWXuTCk 5RnISSSAxs9JL/VhBEk8mCr2fxFfEg5Y1AwGE7w3WLAm0OKsSya/oMCBInYjgypT8Rsg vQcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:mime-version:dkim-signature :delivered-to:sender:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature; bh=EIgDIfnvyWi50M1A/eLQ96S1xITrtB89Bx0HkgT9nZA=; b=jCdsc+ouOMylL0VcUdmSMspv1+CDpZAenRQHuXBURhPBm8Y1fzUN13tYkijsagUtDh II7UAQoEMQqUzmKO33TLI/JltLxVjRzcGpvjN6eQaAy8CQMAH1SSMFmhdHVA/qVPbeVY w0ZjXJSm+1JbpEjsVHeW0rXSo+0NKYTnt3KhY5TvZJ3eShSYbpY21Qo1g6IF7ubH+vQT 0/kGMRa9MfBHLSzmdr57iyD7rH6h6grmoz4gknwhcMKoObR7Vj6exBWfD9+vd0wB6cJL b4SKxJUZixItcoxrcGTceOGzHOWzUDYs6Zitz/bCSVxJqvzWBeqUaxx9uA+bDM7VDgjm tg7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=cBXqQXv6; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="KJR9/S9K"; spf=pass (google.com: domain of gcc-patches-return-504191-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gcc-patches-return-504191-patch=linaro.org@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id f6si12344109plo.382.2019.07.02.07.42.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jul 2019 07:42:23 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-504191-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=cBXqQXv6; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="KJR9/S9K"; spf=pass (google.com: domain of gcc-patches-return-504191-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gcc-patches-return-504191-patch=linaro.org@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=lWB1j4KSX1XwSA1CblwuBE+OiynIpPp0QdrAaAwYn/f+xm Wk6w5bTg8Lpr/FIFgX2X/h4NsIUEq2zKJxPeza2Ts4w+aJMgNrq3uPAU01MFb1lz MG92bB55RZceJ4zv1h3iRiMVqbMVcpXIVksfSk0K49pXJatRqVeEcktQOL4Vk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=JGdd2ioitn1SeDwjrOvGnqVMhU0=; b=cBXqQXv6aUmxLIHBEn1C bnP91VxXWvnE8/X2S7eIoCfVZl03LPfGhC7BUq70CnPfh+05zlukPTXWpLcNpehw aVPTZPSzwuDtAtqAVHXl99j1jtCUxeKPrR3mNhYlVnKcVDcrQaRN6cKT41OcFB7+ Rslu4z5RHtZPbHLZLxFn8qc= Received: (qmail 30682 invoked by alias); 2 Jul 2019 14:42:11 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 30668 invoked by uid 89); 2 Jul 2019 14:42:11 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=headache X-HELO: mail-lf1-f49.google.com Received: from mail-lf1-f49.google.com (HELO mail-lf1-f49.google.com) (209.85.167.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 02 Jul 2019 14:42:09 +0000 Received: by mail-lf1-f49.google.com with SMTP id p24so11572827lfo.6 for ; Tue, 02 Jul 2019 07:42:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:from:date:message-id:subject:to; bh=5ELnGdH4JBugqww1fda7kQ46ECTvcttjIX1fMb+e5Fc=; b=KJR9/S9KlA422tExW1CsFfUbl8SgQ5wcSKCbTvMeaz1ZVwsG67pD8Lh178J7rgVxN2 5cQ6Vier+OLWfL8DVkdpCDhgE+Twh8kAzQ+D3MV0Dw/4oxVViraTaf0rBVz9IUwB4iP1 xXguOZpbvZ8aFjbe3q5qE7lsxwi+I3z4obVw2plReI5SB7dFV6aBkGgEldz/xmTFrJPz strj0QhPFbFGFa6fvAtMA05pDI6ulOvkFLfD0UdZUqgRSHfJPGYzaphKsKnzhRpz9BRA /ONVtzw1HMd9Wx/gp8D496MfESQmMEBg1hRa9UkCjjtRJIqva9MoXykp5BuwtT8bEBNG 8zpA== MIME-Version: 1.0 From: Christophe Lyon Date: Tue, 2 Jul 2019 16:41:55 +0200 Message-ID: Subject: [PATCH][ARM][testsuite] Fix address of sg stubs in CMSE tests To: gcc Patches X-IsSubscribed: yes Hi, While running the GCC testsuite with an armv8-m target, I noticed that a few tests where causing the BFD linker to crash. I opened PR ld/24709 for this [1], but fixing it properly is tricky and not worth the headache. I "fixed" the linker so that it emits a useful error message instead of crashing, and on the GCC side the "fix" is simply to avoid placing the sg stubs section too far from the destination. This is what this patch does, by replacing --section-start,.gnu.sgstubs=0x20400000 with --section-start,.gnu.sgstubs=0x00400000 OK? Thanks, Christophe gcc/testsuite/ChangeLog: 2019-07-02 Christophe Lyon * gcc.target/arm/cmse/bitfield-1.c: Fix address of .gnu.sgstubs section. * gcc.target/arm/cmse/bitfield-2.c: Likewise. * gcc.target/arm/cmse/bitfield-3.c: Likewise. * gcc.target/arm/cmse/struct-1.c: Likewise. diff --git a/gcc/testsuite/gcc.target/arm/cmse/bitfield-1.c b/gcc/testsuite/gcc.target/arm/cmse/bitfield-1.c index fccc51d..0fc191e 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 @@ /* { dg-do run } */ -/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x20400000" } */ +/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x00400000" } */ 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 e6aee3c..f8327c8 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 @@ /* { dg-do run } */ -/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x20400000" } */ +/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x00400000" } */ 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 285a2b9..d0550db 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 @@ /* { dg-do run } */ -/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x20400000" } */ +/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x00400000" } */ typedef struct { diff --git a/gcc/testsuite/gcc.target/arm/cmse/struct-1.c b/gcc/testsuite/gcc.target/arm/cmse/struct-1.c index 2d366a9..874da3c 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 @@ /* { dg-do run } */ -/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x20400000" } */ +/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x00400000" } */ typedef struct {