From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140057.outbound.protection.outlook.com [40.107.14.57]) by sourceware.org (Postfix) with ESMTPS id B9E363858C83 for ; Wed, 28 Sep 2022 11:55:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B9E363858C83 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=Zd1lZSt45GpVNinCujyQ/bBQMlMS5qTEOnU7GTirhDKK6KtZ85JYdH8+2g0wHzfLKiIF/z/lR4NKOYj8u0VBmSAFLHonkhxSdfJgGunqlySub2AGmN6LLBFa9c+9LJqfMYQSIkDWxwz1gN0DRrIZCO6bLE1mP3h/AOMfzDl0FBGAr9qgHSpJggTa4DmrZuiN6ZLANbcC44UpVpvGcEQGI1eoVTntkmogiwcYjla9kcPge90H0BH3hS6AFHJigc3CsrOUPPg5YQqv1LTIwnoqXDh5ZPtPs6g8FS3CK8cC7JZ00N1wkb2A6AEpHO1AO/7xMKiVrhhXC/b0qYcKpIdpxw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=L+5zEyrzCvhV8vhU1umEmF2UTtVEEcHSEww4X3bFYGk=; b=GT/48C15vNKEA56A75SFvRH1frBLGBG9oSpBCUE5hAK3xvf3APB12J0HIlshK2L4yYigDvajjU7AhtJnWywCkva7L78oenpH3q2fGe9/IVOFIU/8zc+JGqeWwvNK5CQmGvUcL6HzyvxUJkHAqGZrZsiwPgbzVFuh972eGkj+tt4+ta2/Bn9HWlunM4pRGgGbopQTq0qXuznnQZRw/oTSx4dEBHA+j6noC8ZSh61/iyxBlpn4qqIAo+TvKtWcJgJto3uwSZqX9uf2FUd+k0vrFepGDF5VzmuIFpZ/fiavEktDz+lUi3ewviJCnfvpxtb6A2O74FZdYlYNhxhnRLv2dg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=L+5zEyrzCvhV8vhU1umEmF2UTtVEEcHSEww4X3bFYGk=; b=ZizdPu7PRKjk2BFvsdWtHXkgEnHI4lCR0LtEa9s45+AQ1S46E3znhaQ4u46ZTwPogD3bNeyoEALjeZLIo3UdxGf/0u/gvXUd44jwhW6+qkHeFkMoJRI3MiK4ZAKwhJdq8lrTpP/OsWC6INgtTR63+Lc1nPgu3q+NGww1bD6J7EI= Received: from DB6PR0301CA0062.eurprd03.prod.outlook.com (2603:10a6:4:54::30) by GV1PR08MB7827.eurprd08.prod.outlook.com (2603:10a6:150:5b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.17; Wed, 28 Sep 2022 11:55:47 +0000 Received: from DBAEUR03FT048.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:54:cafe::9e) by DB6PR0301CA0062.outlook.office365.com (2603:10a6:4:54::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.17 via Frontend Transport; Wed, 28 Sep 2022 11:55:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT048.mail.protection.outlook.com (100.127.142.200) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.17 via Frontend Transport; Wed, 28 Sep 2022 11:55:46 +0000 Received: ("Tessian outbound c2c2da38ad67:v128"); Wed, 28 Sep 2022 11:55:46 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 02ba45522069787b X-CR-MTA-TID: 64aa7808 Received: from f4cefb52ade1.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id FC895228-CB70-4B0A-ACA6-C23C87D9D1A9.1; Wed, 28 Sep 2022 11:55:39 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id f4cefb52ade1.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 28 Sep 2022 11:55:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LvmgvWh47cscLFYGSL+LR/zzG0+o1bYP/lEYU6LWPUaBSRBonu9ri6U8RE1ZCiCXdIGF2u/y4NTkPc2SRDPRIs7Ei/IBJFbaN/I5AhrVt3F2YU7Op5dtmGkNAqj70Ol5t0rmzcQop7n5EDOLMz64ZU+O22tVWN8LlEsWVg13YoH12bolsDFGRPs5BVdN+3k+E5jHTRbMWhUmt1jlSAkm2V/+fE437eib5iULhEkgzAXSQwTA9nT1YreMd0tRCSvCIkA69f+PsTg3ZYco2SRieLdKV7KGL0lZP4TIgfbcDFm+ERcd3yb6FR5AcEI98DB2NNxRJqWjaT1WBeD4PTeXhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=L+5zEyrzCvhV8vhU1umEmF2UTtVEEcHSEww4X3bFYGk=; b=YPnx2MX0LAB59c71hNatoIcL010XYfGC5z3Y2+vty1EnuefBQN+e4+tDm8UYntPUc0Iy6IY70TMlg/c1Zy44+O1kNZhxcEZhGzAh2rnXir096QtrK/7SFDT6niywIT/W90pQDP/weDnrJL08v+M60+DFhZgCpglnMhZnUQBpzmsBL7buPzrGMiJqs8pGnGvseoU9hAJbAZTrqbEjLW5th2cgWRGWIlfq0J7Noka1WkjBIZN+ZlXfnXFR8IvVjZ8QpsZHxyYxQGk/eXgHGw2ShT83ugtSgXC6DboayIaBPfTTc/pGld7V5TM8E8MMGxpYmh8FpeAa7wbD+ubgF1WLQQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=L+5zEyrzCvhV8vhU1umEmF2UTtVEEcHSEww4X3bFYGk=; b=ZizdPu7PRKjk2BFvsdWtHXkgEnHI4lCR0LtEa9s45+AQ1S46E3znhaQ4u46ZTwPogD3bNeyoEALjeZLIo3UdxGf/0u/gvXUd44jwhW6+qkHeFkMoJRI3MiK4ZAKwhJdq8lrTpP/OsWC6INgtTR63+Lc1nPgu3q+NGww1bD6J7EI= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB3390.eurprd08.prod.outlook.com (2603:10a6:803:7d::27) by AS8PR08MB6741.eurprd08.prod.outlook.com (2603:10a6:20b:353::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.17; Wed, 28 Sep 2022 11:55:37 +0000 Received: from VI1PR08MB3390.eurprd08.prod.outlook.com ([fe80::245e:8d78:47b5:4e3e]) by VI1PR08MB3390.eurprd08.prod.outlook.com ([fe80::245e:8d78:47b5:4e3e%4]) with mapi id 15.20.5654.026; Wed, 28 Sep 2022 11:55:37 +0000 Message-ID: Date: Wed, 28 Sep 2022 13:55:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: PING^1 [PATCH] testsuite: 'b' instruction can't do long enough jumps Content-Language: en-US To: Torbjorn SVENSSON , gcc-patches@gcc.gnu.org References: <20220919163040.4104646-1-torbjorn.svensson@foss.st.com> <9ffd26d4-a14f-2ffa-e6e5-750331fd3cdc@foss.st.com> From: Christophe Lyon In-Reply-To: <9ffd26d4-a14f-2ffa-e6e5-750331fd3cdc@foss.st.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SA9PR10CA0028.namprd10.prod.outlook.com (2603:10b6:806:a7::33) To VI1PR08MB3390.eurprd08.prod.outlook.com (2603:10a6:803:7d::27) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3390:EE_|AS8PR08MB6741:EE_|DBAEUR03FT048:EE_|GV1PR08MB7827:EE_ X-MS-Office365-Filtering-Correlation-Id: 24177afb-7e2e-4690-d2db-08daa1486115 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: ghPFPLz6I/piws8muxLf5J/2EiMNvtC5VK67X2T3xOrzotycjU7KYKc6uT6N2Ej1NEqY2rH/emdjKvkP+zqWNcBobDDLJ3PMv0bB0fJsCq6I/PwknV5DR6Zd6OH2QZ6tktXpv1aY+V5Q/102++IsRrB+xlmF3JwBUEviI69MfHmILfs1+wNUREVzsInSuJQeRtV6ZVCaYA/mzr+eWdAQzPHEitkJsKnOPA1bvA5/0rqrKi1MnVbekaQKfhEMHUWxR+6MY53Ry5VNhmBCFVlq7cfBOVfOP/XrAfO5zsLX14IKTwER4LarTHjQPu9g92qwNMlZMGF/YXLtXtC05gs7LI5mgymhQSg1B34mVTbQ07X6DGcWNQBL/YRmPhePdFwrEFth0puPFts8B8WqMLNTQjlpXxLZpKShJeFI5++g9n8KXfaUT7xqKC5s1m/kPSpdpmC/iBijoN7KT0g3FsG/7yuKr2LYeNffAopyey0sHVoWGVLP3v3wpiMBefVdalQPrlY30bz37Lxxitk/3gFR6oxkopBErqd/U6lbIctm7W/hjyaaILi2mRWgvWR2ooXDfR31CCwhBFeU31qVJR81ExaRaqj7q76NdOxfrttj0tOx+wm3XQV9gQcQQb9ZzLAa+p2R4lwvOm3LR3XvwYhwIZu2AuKKfn0ZUXMheTvplKG1ggYttqdq06jbKP5ZsXyeZozJlz1Ot1bKh8qMdZcadxYZR2cGTUg+zdkfgRsaufeUGIo+mvKf9lK2PkkBW0HdQ7hEPTwNNADpHurHE+pbb3pMGsL8jytYfRcMEP+D03xIuUXci5oTerIb7UgA/5pfWu7oX9qHGWdEAKFKQBrLiQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR08MB3390.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(366004)(39860400002)(396003)(346002)(136003)(376002)(451199015)(31686004)(38100700002)(83380400001)(6512007)(44832011)(186003)(2616005)(316002)(478600001)(6486002)(66556008)(66946007)(966005)(66476007)(26005)(8936002)(6506007)(41300700001)(31696002)(8676002)(36756003)(53546011)(6666004)(5660300002)(86362001)(2906002)(81973001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6741 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT048.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: a62cadbc-0c13-433d-82ec-08daa1485b4e X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nxsdq54pLLORXUtSMXAie3ftuS3KTtEkddmxPvdjzufNshjGTbwdvPlgDyHow4bC3xwEEJkPBnIh/V4X9pF5I2mrSeV7a/O8ZIffwJo2OMO+FprVns/BIKT+WnqC/qsQfXGNKcM7pEZ4g3POSI1Tx/PAyO7EhchsYeEFxZRPAlaSvwwertunk6d1G5uVq87IGIG163YlS+vjErhPG3bXrqixvpgEQnJdWwZhw9qjeihOz2I7wO0YHbWaheky5ebyZ1Jzs9e9zCy5q2235aTUHC5u4n1krgere++K6pvR0Zsd+6IMZk1jo6oCYj5iebRlb8e7C7kqIL+HpyKGxCIFJmKEIUtvMWA6M6HDqNvpcRDq7toaLfpziT6xVC1K72JZN4fZb/EaFd6rwqugF1FBugVEjTIuYy5w7Phf4BtNYaI0TMMJ94qPDCxtQYJuZwAGm7sfKto/3QuyqSor9KN8y8gD8AJZb5aJ1uepgTgMLCYKtoYLs32gP0txBsPOW9gIB85kt9Y2ItJnz7Q0KUhIX6paj54FTQpFfJnJYzRCbykmZWBDVwQY+7r7RXMkewrpEVdmjAYvq5RMGgQP5ZdQsLkpEo+Li8OC5hNYqp0vTNWIk7Az7P96A2jxR9d8llg/jg9jLUCCc4kcgddemQ2Kbr26yVNyLaYAb/mOSmdMo6vWiMGXRElGeLZmhWwpOSo1hb9neYcHUVEDjFEgRQYSh3J4hJD5/Svz3o4rsb1LKlfZS9GSzfR8XK4ijq+W4r0deRzpuuPR/j7K6RRIzF7JzEvPjvYRhpR5jQO7RpN2eGBLErPOD/2QkPG4QKAPEifmEL8obpWvUteC1jqjEhQgOi58V4bGWMmG6OTo/Qb9MFA= X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230022)(4636009)(346002)(396003)(39860400002)(376002)(136003)(451199015)(40470700004)(36840700001)(46966006)(53546011)(82310400005)(26005)(6512007)(6506007)(31686004)(47076005)(8676002)(82740400003)(40460700003)(70586007)(70206006)(86362001)(36860700001)(31696002)(316002)(36756003)(81166007)(356005)(40480700001)(478600001)(6666004)(2616005)(186003)(966005)(8936002)(6486002)(44832011)(336012)(83380400001)(41300700001)(2906002)(5660300002)(81973001)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2022 11:55:46.4883 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 24177afb-7e2e-4690-d2db-08daa1486115 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT048.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB7827 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,GIT_PATCH_0,KAM_DMARC_NONE,KAM_SHORT,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,UNPARSEABLE_RELAY 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! On 9/28/22 11:17, Torbjorn SVENSSON via Gcc-patches wrote: > Hi, > > Ping: https://gcc.gnu.org/pipermail/gcc-patches/2022-September/601829.html > > Kind regards, > Torbjörn > > On 2022-09-19 18:30, Torbjörn SVENSSON wrote: >> After moving the testglue in commit 9d503515cee, the jump to exit and >> abort is too far for the 'b' instruction on Cortex-M0. As most of the I am not sure I understand why that commit changed the distance between 'exit' and the branch instruction? >> C code would generate a 'bl' instruction instead of a 'b' >> instruction, lets do the same for the inline assembler. >> >> The error seen without this patch: >> >> /tmp/cccCRiCl.o: in function `main': >> stack-protector-1.c:(.text+0x4e): relocation truncated to fit: >> R_ARM_THM_JUMP11 against symbol `__wrap_exit' defined in .text section >> in gcc_tg.o >> stack-protector-1.c:(.text+0x50): relocation truncated to fit: >> R_ARM_THM_JUMP11 against symbol `__wrap_abort' defined in .text >> section in gcc_tg.o >> collect2: error: ld returned 1 exit status >> Anyway the change seems sensible to me, I suppose it's not worth adding support in the linker to insert long branch stubs for these relocations. Christophe >> gcc/testsuite/ChangeLog: >> >>          * gcc/testsuite/gcc.target/arm/stack-protector-1.c: Use 'bl' >>     instead of 'b' instruction. >>     * gcc/testsuite/gcc.target/arm/stack-protector-3.c: Likewise. >> >> Co-Authored-By: Yvan ROUX  >> Signed-off-by: Torbjörn SVENSSON  >> --- >>   gcc/testsuite/gcc.target/arm/stack-protector-1.c | 4 ++-- >>   gcc/testsuite/gcc.target/arm/stack-protector-3.c | 2 +- >>   2 files changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/gcc/testsuite/gcc.target/arm/stack-protector-1.c >> b/gcc/testsuite/gcc.target/arm/stack-protector-1.c >> index 8d28b0a847c..3f0ffc9c3f3 100644 >> --- a/gcc/testsuite/gcc.target/arm/stack-protector-1.c >> +++ b/gcc/testsuite/gcc.target/arm/stack-protector-1.c >> @@ -56,8 +56,8 @@ asm ( >>   "    ldr    r1, [sp, #4]\n" >>       CHECK (r1) >>   "    mov    r0, #0\n" >> -"    b    exit\n" >> +"    bl    exit\n" >>   "1:\n" >> -"    b    abort\n" >> +"    bl    abort\n" >>   "    .size    main, .-main" >>   ); >> diff --git a/gcc/testsuite/gcc.target/arm/stack-protector-3.c >> b/gcc/testsuite/gcc.target/arm/stack-protector-3.c >> index b8f77fa2309..2f710529b8f 100644 >> --- a/gcc/testsuite/gcc.target/arm/stack-protector-3.c >> +++ b/gcc/testsuite/gcc.target/arm/stack-protector-3.c >> @@ -26,7 +26,7 @@ asm ( >>   "    .type    __stack_chk_fail, %function\n" >>   "__stack_chk_fail:\n" >>   "    movs    r0, #0\n" >> -"    b    exit\n" >> +"    bl    exit\n" >>   "    .size    __stack_chk_fail, .-__stack_chk_fail" >>   );