From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by sourceware.org (Postfix) with ESMTPS id 999553858C39 for ; Mon, 1 Jul 2024 03:04:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 999553858C39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 999553858C39 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=198.175.65.13 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1719803046; cv=pass; b=r5zJ6M9zsyfvFIfGOpFeBVppREbczRLS8Li0hvAOlZO6nrwI9PQJcEwu3WePhiY68clMfXxD5Pl63LoarVQ5WwcP+pXXqDz6q5cL1XCW55v/Nmu6nfGymbD3CKowW2znXEi4b2UwRvKyHY/zQ3cwYldy88hR2uCWa2Q72vf4KsI= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1719803046; c=relaxed/simple; bh=7IwWpXwF2LGY7c0UfvKqCKgpNRLJXYKoaIlyOaiaiJU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=EpZUlWKMxqOsgrd99ibS6NPBpioylyetmRAltITqYBJ6SU4BWoxLcqcbFTqn38Fz8wK4DrPSNoQbSHf66X6c5Fh+UO5yWrV3RjrBERBZceA4TY89yendOr7qhe1ylpqPdNpBiazPKFIeBD7O92QLnGOZkFcUqDexxakWvhyqEo4= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719803040; x=1751339040; h=from:to:cc:subject:date:message-id:mime-version; bh=7IwWpXwF2LGY7c0UfvKqCKgpNRLJXYKoaIlyOaiaiJU=; b=oBFuCUh2X5G+K56xY8JkWktm7xvlH5WQidNBFHqW/40UmszM0XqYzY4W B4YzYzfkNW9TBuTVtTHl3MLIFnH4Bqchjkz7Ml06J4POozmz1FUJwkN5a ONai89ni9xE9iefBmRt5WZMe+ppBsDZ/diK98xinX3P3rUIyQMGuQ7zCm qyhHFIRMO4ItLrIKI/1sFZqBLGD48yg4W7YiqOyVyBrexiJAD7/ITIc8q C2iq1erRWloT9tJUyV/dSjT4xbvjso/+sQB4HBO5Wah8jr11RGqdvmtIE M/kBiZrx9ADxzG3kpwOWVSn0hRFcSgUG5uOPpP4sgVW3J44NEYo+6JpwA g==; X-CSE-ConnectionGUID: ZTMHFYkyQkCoddvjFUT5HA== X-CSE-MsgGUID: PFBSNPiDS5SvGZtPBiH55A== X-IronPort-AV: E=McAfee;i="6700,10204,11119"; a="28034027" X-IronPort-AV: E=Sophos;i="6.09,175,1716274800"; d="scan'208,217";a="28034027" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2024 20:03:59 -0700 X-CSE-ConnectionGUID: n5kTAParSEyCItd/kBABwA== X-CSE-MsgGUID: MRvSsj6ISZ+NW2/ML/BbSQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,175,1716274800"; d="scan'208,217";a="50250265" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orviesa003.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 30 Jun 2024 20:04:00 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Sun, 30 Jun 2024 20:03:58 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Sun, 30 Jun 2024 20:03:58 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.40) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Sun, 30 Jun 2024 20:03:58 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZVO3Dn+iwUeN/rGZ2FoiaJFRwfmp2bAXywnhHWD6t35gmX8zLyPFjLuc+ypkXdc2X7EJCtf+RB04oLrK270f6b6og0Mow5jNcqL0h7YoPKvMzyRmiSskt1xWgT7poYVsFcCvXRMKwXpf8FlQezJmfVaXDUYPVyGNJQl7J79EgQ+LzrqlfKBfUXozxcnRXoWSvjjM1IO9U9xyBdW/OgfxxgtcWd1BgHDhh52stwQnIwwR9U/8vHeW3btEhJpalD75Siv90UT66+8k2zIa3mpHsRQt2+75uWbu9M3ATA0vMc0G1QfP7HeskA0H2OUTZwl4zrxy5n6zXJYpiGyahIV5qQ== 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=lr2CK3Fr1zUEOuOKIl2bC9AAXJxb8EqRWJh8/NRpXKE=; b=C63UnGa6eZ42WV7yi27LYjrJqirJOghOBOa417Y6I0xhctzRmXlROnOW4BacM176gYiaMmBmhq0l8xzb7M95Jti0eUJRpUVLQaMeCynhn/ZpnCVJxIg146t4OWw+Mpl7mAm2vPM7NLixOjsgXoIlosZJNPI2XOb9lw2F/Tq0Yk24F5CyIyF8Oz5RsgStkabe2sHGFrvKlY0hqDhzwuvz2Gi4H0ev/xueXVNbrcon9B524VureFRrzZs+FG4rwUvvEe/zHeThgOosY3WbAOP/kloc7mMitfopRKbsDm6SC2zXQBVPeKGtg8gmejHp2qOc/Fex8hk6M0TCM9YdLKm0+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM4PR11MB5487.namprd11.prod.outlook.com (2603:10b6:5:39f::22) by IA1PR11MB7271.namprd11.prod.outlook.com (2603:10b6:208:429::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.32; Mon, 1 Jul 2024 03:03:55 +0000 Received: from DM4PR11MB5487.namprd11.prod.outlook.com ([fe80::8221:de1b:c203:95d2]) by DM4PR11MB5487.namprd11.prod.outlook.com ([fe80::8221:de1b:c203:95d2%7]) with mapi id 15.20.7719.029; Mon, 1 Jul 2024 03:03:55 +0000 From: "Kong, Lingling" To: "binutils@sourceware.org" CC: "H. J. Lu" , "Beulich, Jan" Subject: [PATCH v2] x86-64: Relax BFD_RELOC_X86_64_GOTTPOFF check Thread-Topic: [PATCH v2] x86-64: Relax BFD_RELOC_X86_64_GOTTPOFF check Thread-Index: AdrLYuPUFYAkQZYiRvuWTcidBZbqYg== Date: Mon, 1 Jul 2024 03:03:55 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR11MB5487:EE_|IA1PR11MB7271:EE_ x-ms-office365-filtering-correlation-id: 7b6f5dc6-652a-4479-af33-08dc997a71a3 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|366016|1800799024|376014|38070700018; x-microsoft-antispam-message-info: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kIcWi+uBzTs+NkHmttU+AqjFN605xl3IFabfVg?= =?us-ascii?Q?b91wacTlKasYSUXpTFRMTuzgR3SS7fIivxinsb55pmlGGF53aeV6opxqz+u7?= =?us-ascii?Q?2HPvKwqh2q7TqaKcfXoctiKkM8UALLOaRCl3CAV7aZQhePmlm/SUQ2o9sDOc?= =?us-ascii?Q?YPBRbq25baDoTAsKBurZM3I7EZzNLXFg3uJdD/0rTDC8naknrGnSoBPjIK6t?= =?us-ascii?Q?f5/oXx7q8shnvXY63yR9m1d0ZCe5tJM7aDy3czHlZRPRcRJ1symr9+FZWkA0?= =?us-ascii?Q?gDeK5Tmi2viZLO1zHrbNDElJUfs4PLhYkk/oN9MG1F8TUxcaBJJEtfmfXCz2?= =?us-ascii?Q?ECwZIoFMzR3g75dX+PtOcS2XtrHEiMlzMUVXa8kcO5yLIThZVIX4udjrZGYj?= =?us-ascii?Q?eKMzoKlnlGOR83Nl8MtpAxm+aS67A8TnwRC6fED+/o5CjGodxbqEpQtk1DpO?= =?us-ascii?Q?8Kw3QmsoUQ9aXFB9mpLTcfOfz9J6MPBsKtJnfr1B/T6tW7vC1vmcl3drGLur?= =?us-ascii?Q?1vl94qnltHRksahJr4u9E1bfmj4T6XKuqWhtUIxap35sx4mS+w=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR11MB5487.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(38070700018);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?v0QCPaBrBjvmuLsHxm7e0XdiHm/2rFVxCsl6YwhwnbTCBp/c0CPEuTxTD1nm?= =?us-ascii?Q?OXYUHhyiMMM+BDwVDyA2tBg1I1SvgYLsc/m4SAZxIhRkeq0SHilDAzPh2v2e?= =?us-ascii?Q?plaH4ZbiEQ2QCy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= =?us-ascii?Q?ZtOQCHLMF9YtEfa7ybV1nxgCHQSg2X6SOTvftsMBEW6PznDaQphWtBc3y0hu?= =?us-ascii?Q?IWzZ9l4myXR36EL8msF6qKtb/SlzavatJy0Csxam9L6Vd8ZNJVa5ez/qnRex?= =?us-ascii?Q?Ba0mUquARQ9AIEOtj3xcQl6Dlndx0goat5WFdISY7A8M+qiU0w1vEdAIzGNP?= =?us-ascii?Q?LkDVeDD26Twic2PhRrb+wweX4ZCWehA+KGhoSwkcF0V7RXG1yL/qZgvQqja/?= =?us-ascii?Q?rFwmvUM3t2z6Dq6O1EKjf6yyc8CbIfNBKteUV94VnhWBGdYqyqeambfaRnO8?= =?us-ascii?Q?0WmJ9cw5rYxGS7AJpXcCMvc7K72MONYJwcv/88QnWXXvbjT5qfz+s8mwXkNi?= =?us-ascii?Q?mBG0LE4DKJkUQBGtpuNeJqKz1NJCj7bdQK6L5ZIsEazaKswe0hPtoo8MYgkO?= =?us-ascii?Q?lrOFt2vgxbwL7RTLzAAyqC3uZgh99eKA+Hs1XsbMN1XWbuU5M1NkEeFtNSHJ?= =?us-ascii?Q?A7plxcdDZljiXMFoE4VpElxT5PrtU0znr1fs1xC6MFEwFBJbfcbipz50PxSa?= =?us-ascii?Q?Zqwf06Uq0uwQ75IAlOefOc1Wp9qQXs1InLKrR7Wp?= Content-Type: multipart/alternative; boundary="_000_DM4PR11MB5487EB130EE457CDE8EE2B66ECD32DM4PR11MB5487namp_" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5487.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7b6f5dc6-652a-4479-af33-08dc997a71a3 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Jul 2024 03:03:55.1091 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: wjgHBgD0v25lmhifFkEONPTlaf0sxoCp7uq4i5ApOBxrFZa0aIDm88FwobepruCLL6vCeGqnu5CMZMGDeiCewQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR11MB7271 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,HTML_MESSAGE,SPF_HELO_NONE,SPF_NONE,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: --_000_DM4PR11MB5487EB130EE457CDE8EE2B66ECD32DM4PR11MB5487namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Updated the patch according to review comments. Thanks, Lingling Relax BFD_RELOC_X86_64_GOTTPOFF check for APX NF, Allow "{nf} add foo@gottpoff(%rip), %reg1" gas/ * config/tc-i386.c (md_assemble): Relax BFD_RELOC_X86_64_GOTTPOFF check. Allow "{nf} add foo@gottpoff(%rip), %reg1". * testsuite/gas/i386/x86-64-gottpoff.d: Updated. * testsuite/gas/i386/x86-64-gottpoff.s: Add tests for "{nf} add foo@gottpoff(%rip), %reg", "{nf} add %reg1, foo@gottpoff(%rip), %reg2" and "{nf} add foo@gottpoff(%rip), %reg, %reg2". gold/ * testsuite/x86_64_ie_to_le.s: Add tests for "{nf} add foo@gottpoff(%rip), %reg", "{nf} add %reg1, foo@gottpoff(%rip), %reg2" and "{nf} add foo@gottpoff(%rip), %reg, %reg2". * testsuite/x86_64_ie_to_le.sh: Updated. ld/ * testsuite/ld-x86-64/tlsbindesc.s: Add R_X86_64_CODE_6_GOTTPOFF for APX NF tests. * testsuite/ld-x86-64/tlsbindesc.d: Updated. * testsuite/ld-x86-64/tlsbindesc.rd: Likewise. --- gas/config/tc-i386.c | 10 +++++-- gas/testsuite/gas/i386/x86-64-gottpoff.d | 12 ++++++-- gas/testsuite/gas/i386/x86-64-gottpoff.s | 14 +++++++++ gold/testsuite/x86_64_ie_to_le.s | 3 ++ gold/testsuite/x86_64_ie_to_le.sh | 3 ++ ld/testsuite/ld-x86-64/tlsbindesc.dd | 36 ++++++++++++++++++++++++ ld/testsuite/ld-x86-64/tlsbindesc.rd | 36 ++++++++++++------------ ld/testsuite/ld-x86-64/tlsbindesc.s | 12 ++++++++ 8 files changed, 104 insertions(+), 22 deletions(-) diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index ab526924897..4f8727b0f6a 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -7137,8 +7137,14 @@ md_assemble (char *line) && i.base_reg && i.base_reg->reg_num =3D=3D RegIP && i.tm.operand_types[0].bitfield.class =3D=3D= Reg - && i.tm.operand_types[2].bitfield.class =3D= =3D Reg) - /* Allow APX: add %reg1, foo@gottpoff(%rip), %reg2. */ + && (i.tm.operand_types[2].bitfield.class =3D= =3D Reg + || i.tm.operands =3D=3D 2)) + /* Allow APX: + add %reg1, foo@gottpoff(%rip), %reg2 + add foo@gottpoff(%rip), %reg, %reg2 + {nf} add foo@gottpoff(%rip), %reg + {nf} add %reg1, foo@gottpoff(%rip), %reg2 + {nf} add foo@gottpoff(%rip), %reg, %reg2. */ break; /* Fall through. */ case BFD_RELOC_386_TLS_GOTIE: diff --git a/gas/testsuite/gas/i386/x86-64-gottpoff.d b/gas/testsuite/gas/i= 386/x86-64-gottpoff.d index f2c039abe72..8f1c10f936c 100644 --- a/gas/testsuite/gas/i386/x86-64-gottpoff.d +++ b/gas/testsuite/gas/i386/x86-64-gottpoff.d @@ -18,6 +18,14 @@ Disassembly of section .text: +[a-f0-9]+: d5 48 8b 25 00 00 00 00 mov 0x0\(%rip\= ),%r20 # 3c <_start\+0x3c> 38: R_X86_64_CODE_4_GOTTPOFF foo-0x4 +[a-f0-9]+: 62 74 fc 10 01 05 00 00 00 00 add %r8,0x0\(%rip\= ),%r16 # 46 <_start\+0x46> 42: R_X86_64_CODE_6_GOTTPOFF foo-0x4 +[a-f0-9]+: 62 f4 9c 18 03 05 00 00 00 00 add 0x0\(%rip\),%r= ax,%r12 # 50 <_start\+0x50> 4c: R_X86_64_CODE_6_GOTTPOFF foo-0= x4 - +[a-f0-9]+: 62 74 fc 10 01 05 00 00 00 00 add %r8,0x0\(%rip\)= ,%r16 # 5a <_start\+0x5a> 56: R_X86_64_CODE_6_GOTTPOFF foo-0x4 - +[a-f0-9]+: 62 f4 9c 18 03 05 00 00 00 00 add 0x0\(%rip\),%ra= x,%r12 # 64 <_start\+0x64> 60: R_X86_64_CODE_6_GOTTPOFF foo-0x4 + +[a-f0-9]+: 62 74 fc 14 01 05 00 00 00 00 \{nf\} add %r8,0x0\(%ri= p\),%r16 # 5a <_start\+0x5a> 56: R_X86_64_CODE_6_GOTTPOFF foo-= 0x4 + +[a-f0-9]+: 62 f4 9c 1c 03 05 00 00 00 00 \{nf\} add 0x0\(%rip\),= %rax,%r12 # 64 <_start\+0x64> 60: R_X86_64_CODE_6_GOTTPOFF foo= -0x4 + +[a-f0-9]+: 62 74 fc 10 01 05 00 00 00 00 add %r8,0x0\(%rip\),= %r16 # 6e <_start\+0x6e> 6a: R_X86_64_CODE_6_GOTTPOFF foo-0x4 + +[a-f0-9]+: 62 f4 9c 18 03 05 00 00 00 00 add 0x0\(%rip\),%rax= ,%r12 # 78 <_start\+0x78> 74: R_X86_64_CODE_6_GOTTPOFF foo-0x4 + +[a-f0-9]+: 62 74 fc 14 01 05 00 00 00 00 \{nf\} add %r8,0x0\(%ri= p\),%r16 # 82 <_start\+0x82> 7e: R_X86_64_CODE_6_GOTTPOFF foo-= 0x4 + +[a-f0-9]+: 62 f4 9c 1c 03 05 00 00 00 00 \{nf\} add 0x0\(%rip\),= %rax,%r12 # 8c <_start\+0x8c> 88: R_X86_64_CODE_6_GOTTPOFF foo= -0x4 + +[a-f0-9]+: 62 f4 fc 0c 03 05 00 00 00 00 \{nf\} add 0x0\(%rip\)= ,%rax # 96 <_start\+0x96> 92: R_X86_64_CODE_6_GOTTPOFF foo-0x4 + +[a-f0-9]+: 62 e4 fc 0c 03 05 00 00 00 00 \{nf\} add 0x0\(%rip\),= %r16 # a0 <_start\+0xa0> 9c: R_X86_64_CODE_6_GOTTPOFF foo-0x4 + +[a-f0-9]+: 62 f4 fc 0c 03 05 00 00 00 00 \{nf\} add 0x0\(%rip\)= ,%rax # aa <_start\+0xaa> a6: R_X86_64_CODE_6_GOTTPOFF foo-0x4 + +[a-f0-9]+: 62 e4 fc 0c 03 05 00 00 00 00 \{nf\} add 0x0\(%rip\),= %r16 # b4 <_start\+0xb4> b0: R_X86_64_CODE_6_GOTTPOFF foo-0x4 #pass diff --git a/gas/testsuite/gas/i386/x86-64-gottpoff.s b/gas/testsuite/gas/i= 386/x86-64-gottpoff.s index e39010afc69..48d8a59a746 100644 --- a/gas/testsuite/gas/i386/x86-64-gottpoff.s +++ b/gas/testsuite/gas/i386/x86-64-gottpoff.s @@ -18,8 +18,22 @@ _start: addq %r8, foo@GOTTPOFF(%rip), %r16 addq foo@GOTTPOFF(%rip), %rax, %r12 + {nf} addq %r8, foo@GOTTPOFF(%rip), %r16 + {nf} addq foo@GOTTPOFF(%rip), %rax, %r12 .intel_syntax noprefix add r16, QWORD PTR [rip + foo@GOTTPOFF], r8 add r12, rax, QWORD PTR [rip + foo@GOTTPOFF] + {nf} add r16, QWORD PTR [rip + foo@GOTTPOFF], r8 + {nf} add r12, rax, QWORD PTR [rip + foo@GOTTPOF= F] + + .att_syntax prefix + + {nf} addq foo@GOTTPOFF(%rip), %rax + {nf} addq foo@GOTTPOFF(%rip), %r16 + + .intel_syntax noprefix + + {nf} add rax, QWORD PTR [rip + foo@GOTTPOFF] + {nf} add r16, QWORD PTR [rip + foo@GOTTPOFF] diff --git a/gold/testsuite/x86_64_ie_to_le.s b/gold/testsuite/x86_64_ie_to= _le.s index bd0643dc87f..4bf3f4abafb 100644 --- a/gold/testsuite/x86_64_ie_to_le.s +++ b/gold/testsuite/x86_64_ie_to_le.s @@ -9,6 +9,9 @@ _start: movq foo@gottpoff(%rip), %r20 addq %r30, foo@gottpoff(%rip), %r8 addq foo@gottpoff(%rip), %rax, %r20 + {nf} addq foo@gottpoff(%rip), %r16 + {nf} addq %r30, foo@gottpoff(%rip), %r8 + {nf} addq foo@gottpoff(%rip), %rax, %r20 .size _start, .-_start .section .tdata,"awT",@progbits .align 4 diff --git a/gold/testsuite/x86_64_ie_to_le.sh b/gold/testsuite/x86_64_ie_t= o_le.sh index 5308712ddbd..10e84686db8 100755 --- a/gold/testsuite/x86_64_ie_to_le.sh +++ b/gold/testsuite/x86_64_ie_to_le.sh @@ -29,3 +29,6 @@ grep -q "add[ \t]\+\$0x[a-f0-9]\+,%r16" x86_64_ie_to_le.s= tdout grep -q "mov[ \t]\+\$0x[a-f0-9]\+,%r20" x86_64_ie_to_le.stdout grep -q "add[ \t]\+\$0x[a-f0-9]\+,%r30,%r8" x86_64_ie_to_le.stdout grep -q "add[ \t]\+\$0x[a-f0-9]\+,%rax,%r20" x86_64_ie_to_le.stdout +grep -q "\{nf\} add[ \t]\+\$0x[a-f0-9]\+,%r16" x86_64_ie_to_le.stdout +grep -q "\{nf\} add[ \t]\+\$0x[a-f0-9]\+,%r30,%r8" x86_64_ie_to_le.stdout +grep -q "\{nf\} add[ \t]\+\$0x[a-f0-9]\+,%rax,%r20" x86_64_ie_to_le.stdout diff --git a/ld/testsuite/ld-x86-64/tlsbindesc.dd b/ld/testsuite/ld-x86-64/= tlsbindesc.dd index be89f38199d..601dfc2fc6d 100644 --- a/ld/testsuite/ld-x86-64/tlsbindesc.dd +++ b/ld/testsuite/ld-x86-64/tlsbindesc.dd @@ -173,6 +173,15 @@ Disassembly of section .text: # -> R_X86_64_TPOFF= 64 sG2 +[0-9a-f]+: ([0-9a-f]{2} ){3} * +[0-9a-f]+: 62 f4 fc 10 03 ([0-9a-f]{2} ){2}[ ]+add 0x[0-9a-f]= +\(%rip\),%rax,%r16 +# [0-9a-f]+ +# -> R_X86_64_TPOFF6= 4 sG2 + +[0-9a-f]+: ([0-9a-f]{2} ){3} * + +[0-9a-f]+: 62 e4 fc 0c 03 ([0-9a-f]{2} ){2}[ ]+\{nf\} add 0x[0-9a-f= ]+\(%rip\),%r16 +# [0-9a-f]+ +# -> R_X86_64_TPOFF6= 4 sG2 + +[0-9a-f]+: ([0-9a-f]{2} ){3} * + +[0-9a-f]+: 62 f4 fc 14 01 ([0-9a-f]{2} ){2}[ ]+\{nf\} add %rax,0x= [0-9a-f]+\(%rip\),%r16 +# [0-9a-f]+ +# -> R_X86_64_TPOFF6= 4 sG2 + +[0-9a-f]+: ([0-9a-f]{2} ){3} * + +[0-9a-f]+: 62 f4 fc 14 03 ([0-9a-f]{2} ){2}[ ]+\{nf\} add 0x[0-9a= -f]+\(%rip\),%rax,%r16 +# [0-9a-f]+ # -> R_X86_64_TPOFF= 64 sG2 +[0-9a-f]+: ([0-9a-f]{2} ){3} * # IE -> LE against global var defined in exec @@ -183,6 +192,15 @@ Disassembly of section .text: # = sg1 +[0-9a-f]+: ff ff ff * +[0-9a-f]+: 62 d4 f4 10 81 ([0-9a-f]{2} ){2}[ ]+add \$0x[0-9a-f]= +,%r8,%r17 +# = sg1 + +[0-9a-f]+: ff ff ff * + +[0-9a-f]+: 62 fc fc 0c 81 ([0-9a-f]{2} ){2}[ ]+\{nf\} add \$0x[0-= 9a-f]+,%r17 +# = sg1 + +[0-9a-f]+: ff ff ff * + +[0-9a-f]+: 62 d4 f4 14 81 ([0-9a-f]{2} ){2}[ ]+\{nf\} add \$0x[0-9a= -f]+,%r8,%r17 +# = sg1 + +[0-9a-f]+: ff ff ff * + +[0-9a-f]+: 62 d4 f4 14 81 ([0-9a-f]{2} ){2}[ ]+\{nf\} add \$0x[0-9a= -f]+,%r8,%r17 # = sg1 +[0-9a-f]+: ff ff ff * # IE -> LE against local var @@ -193,6 +211,15 @@ Disassembly of section .text: # = sl1 +[0-9a-f]+: ff ff ff * +[0-9a-f]+: 62 d4 fc 18 81 ([0-9a-f]{2} ){2}[ ]+add \$0x[0-9a-f]= +,%r8,%rax +# = sl1 + +[0-9a-f]+: ff ff ff * + +[0-9a-f]+: 62 fc fc 0c 81 ([0-9a-f]{2} ){2}[ ]+\{nf\} add \$0x[0-= 9a-f]+,%r18 +# = sl1 + +[0-9a-f]+: ff ff ff * + +[0-9a-f]+: 62 d4 fc 1c 81 ([0-9a-f]{2} ){2}[ ]+\{nf\} add \$0x[0-9a= -f]+,%r8,%rax +# = sl1 + +[0-9a-f]+: ff ff ff * + +[0-9a-f]+: 62 d4 fc 1c 81 ([0-9a-f]{2} ){2}[ ]+\{nf\} add \$0x[0-9a= -f]+,%r8,%rax # = sl1 +[0-9a-f]+: ff ff ff * # IE -> LE against hidden var @@ -203,6 +230,15 @@ Disassembly of section .text: # = sh1 +[0-9a-f]+: ff ff ff * +[0-9a-f]+: 62 fc bc 18 81 ([0-9a-f]{2} ){2}[ ]+add \$0x[0-9a-f]= +,%r19,%r8 +# = sh1 + +[0-9a-f]+: ff ff ff * + +[0-9a-f]+: 62 fc fc 0c 81 ([0-9a-f]{2} ){2}[ ]+\{nf\} add \$0x[0-= 9a-f]+,%r19 +# = sh1 + +[0-9a-f]+: ff ff ff * + +[0-9a-f]+: 62 fc bc 1c 81 ([0-9a-f]{2} ){2}[ ]+\{nf\} add \$0x[0-9a= -f]+,%r19,%r8 +# = sh1 + +[0-9a-f]+: ff ff ff * + +[0-9a-f]+: 62 fc bc 1c 81 ([0-9a-f]{2} ){2}[ ]+\{nf\} add \$0x[0-9a= -f]+,%r19,%r8 # = sh1 +[0-9a-f]+: ff ff ff * # Direct access through %fs diff --git a/ld/testsuite/ld-x86-64/tlsbindesc.rd b/ld/testsuite/ld-x86-64/= tlsbindesc.rd index 59325b04e19..2fc965aef20 100644 --- a/ld/testsuite/ld-x86-64/tlsbindesc.rd +++ b/ld/testsuite/ld-x86-64/tlsbindesc.rd @@ -15,12 +15,12 @@ Section Headers: +\[[ 0-9]+\] .dynsym +.* +\[[ 0-9]+\] .dynstr +.* +\[[ 0-9]+\] .rela.dyn +.* - +\[[ 0-9]+\] .text +PROGBITS +0+401000 0+1000 0+2ad 00 +AX +0 +0 +4096 - +\[[ 0-9]+\] .tdata +PROGBITS +0+6012ad 0+12ad 0+60 00 WAT +0 +0 +1 - +\[[ 0-9]+\] .tbss +NOBITS +0+60130d 0+130d 0+40 00 WAT +0 +0 +1 - +\[[ 0-9]+\] .dynamic +DYNAMIC +0+601310 0+1310 0+100 10 +WA +4 +0 +8 - +\[[ 0-9]+\] .got +PROGBITS +0+601410 0+1410 0+20 08 +WA +0 +0 +8 - +\[[ 0-9]+\] .got.plt +PROGBITS +0+601430 0+1430 0+18 08 +WA +0 +0 +8 + +\[[ 0-9]+\] .text +PROGBITS +0+401000 0+1000 0+325 00 +AX +0 +0 +4096 + +\[[ 0-9]+\] .tdata +PROGBITS +0+601325 0+1325 0+60 00 WAT +0 +0 +1 + +\[[ 0-9]+\] .tbss +NOBITS +0+601385 0+1385 0+40 00 WAT +0 +0 +1 + +\[[ 0-9]+\] .dynamic +DYNAMIC +0+601388 0+1388 0+100 10 +WA +4 +0 +8 + +\[[ 0-9]+\] .got +PROGBITS +0+601488 0+1488 0+20 08 +WA +0 +0 +8 + +\[[ 0-9]+\] .got.plt +PROGBITS +0+6014a8 0+14a8 0+18 08 +WA +0 +0 +8 +\[[ 0-9]+\] .symtab +.* +\[[ 0-9]+\] .strtab +.* +\[[ 0-9]+\] .shstrtab +.* @@ -28,7 +28,7 @@ Key to Flags: #... Elf file type is EXEC \(Executable file\) -Entry point 0x4011b5 +Entry point 0x40122d There are [0-9]+ program headers, starting at offset [0-9]+ Program Headers: @@ -36,10 +36,10 @@ Program Headers: +PHDR.* +INTERP.* .*Requesting program interpreter.* - +LOAD +0x0+ 0x0+400000 0x0+400000 0x0+12ad 0x0+12ad R E 0x200000 - +LOAD +0x0+12ad 0x0+6012ad 0x0+6012ad 0x0+19b 0x0+19b RW +0x200000 - +DYNAMIC +0x0+1310 0x0+601310 0x0+601310 0x0+100 0x0+100 RW +0x8 - +TLS +0x0+12ad 0x0+6012ad 0x0+6012ad 0x0+60 0x0+a0 R +0x1 + +LOAD +0x0+ 0x0+400000 0x0+400000 0x0+1325 0x0+1325 R E 0x200000 + +LOAD +0x0+1325 0x0+601325 0x0+601325 0x0+19b 0x0+19b RW +0x200000 + +DYNAMIC +0x0+1388 0x0+601388 0x0+601388 0x0+100 0x0+100 RW +0x8 + +TLS +0x0+1325 0x0+601325 0x0+601325 0x0+60 0x0+a0 R +0x1 Section to Segment mapping: +Segment Sections... @@ -52,10 +52,10 @@ Program Headers: Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 4 entries: +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend -0+601410 +0+100000012 R_X86_64_TPOFF64 +0+ sG5 \+ 0 -0+601418 +0+200000012 R_X86_64_TPOFF64 +0+ sG2 \+ 0 -0+601420 +0+300000012 R_X86_64_TPOFF64 +0+ sG6 \+ 0 -0+601428 +0+400000012 R_X86_64_TPOFF64 +0+ sG1 \+ 0 +0+601488 +0+100000012 R_X86_64_TPOFF64 +0+ sG5 \+ 0 +0+601490 +0+200000012 R_X86_64_TPOFF64 +0+ sG2 \+ 0 +0+601498 +0+300000012 R_X86_64_TPOFF64 +0+ sG6 \+ 0 +0+6014a0 +0+400000012 R_X86_64_TPOFF64 +0+ sG1 \+ 0 Symbol table '\.dynsym' contains [0-9]+ entries: +Num: +Value +Size +Type +Bind +Vis +Ndx +Name @@ -88,8 +88,8 @@ Symbol table '\.symtab' contains [0-9]+ entries: +[0-9]+: 0+9c +0 +TLS +LOCAL +DEFAULT +8 bl8 .* FILE +LOCAL +DEFAULT +ABS +[0-9]+: 0+a0 +0 +TLS +LOCAL +DEFAULT +7 _TLS_MODULE_BASE_ - +[0-9]+: 0+601310 +0 +OBJECT +LOCAL +DEFAULT +9 _DYNAMIC - +[0-9]+: 0+601430 +0 +OBJECT +LOCAL +DEFAULT +11 _GLOBAL_OFFSET_TABLE_ + +[0-9]+: 0+601388 +0 +OBJECT +LOCAL +DEFAULT +9 _DYNAMIC + +[0-9]+: 0+6014a8 +0 +OBJECT +LOCAL +DEFAULT +11 _GLOBAL_OFFSET_TABLE_ +[0-9]+: 0+1c +0 +TLS +GLOBAL +DEFAULT +7 sg8 +[0-9]+: 0+7c +0 +TLS +GLOBAL +DEFAULT +8 bg8 +[0-9]+: 0+74 +0 +TLS +GLOBAL +DEFAULT +8 bg6 @@ -104,7 +104,7 @@ Symbol table '\.symtab' contains [0-9]+ entries: +[0-9]+: 0+58 +0 +TLS +GLOBAL +HIDDEN +7 sh7 +[0-9]+: 0+5c +0 +TLS +GLOBAL +HIDDEN +7 sh8 +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +7 sg1 - +[0-9]+: 0+4011b5 +0 +FUNC +GLOBAL +DEFAULT +6 _start + +[0-9]+: 0+40122d +0 +FUNC +GLOBAL +DEFAULT +6 _start +[0-9]+: 0+4c +0 +TLS +GLOBAL +HIDDEN +7 sh4 +[0-9]+: 0+78 +0 +TLS +GLOBAL +DEFAULT +8 bg7 +[0-9]+: 0+50 +0 +TLS +GLOBAL +HIDDEN +7 sh5 diff --git a/ld/testsuite/ld-x86-64/tlsbindesc.s b/ld/testsuite/ld-x86-64/t= lsbindesc.s index 4747fc1bc30..39ba3bbaa9f 100644 --- a/ld/testsuite/ld-x86-64/tlsbindesc.s +++ b/ld/testsuite/ld-x86-64/tlsbindesc.s @@ -131,21 +131,33 @@ fn2: addq sG2@gottpoff(%rip), %r16 addq %rax, sG2@gottpoff(%rip), %r16 addq sG2@gottpoff(%rip), %rax, %r16 + {nf} addq sG2@gottpoff(%rip), %r16 + {nf} addq %rax, sG2@gottpoff(%rip), %r16 + {nf} addq sG2@gottpoff(%rip), %rax, %r16 /* IE -> LE against global var defined in exec */ addq sg1@gottpoff(%rip), %r17 addq %r8, sg1@gottpoff(%rip), %r17 addq sg1@gottpoff(%rip), %r8, %r17 + {nf} addq sg1@gottpoff(%rip), %r17 + {nf} addq %r8, sg1@gottpoff(%rip), %r17 + {nf} addq sg1@gottpoff(%rip), %r8, %r17 /* IE -> LE against local var */ addq sl1@gottpoff(%rip), %r18 addq %r8, sl1@gottpoff(%rip), %rax addq sl1@gottpoff(%rip), %r8, %rax + {nf} addq sl1@gottpoff(%rip), %r18 + {nf} addq %r8, sl1@gottpoff(%rip), %rax + {nf} addq sl1@gottpoff(%rip), %r8, %rax /* IE -> LE against hidden var */ addq sh1@gottpoff(%rip), %r19 addq %r19, sh1@gottpoff(%rip), %r8 addq sh1@gottpoff(%rip), %r19, %r8 + {nf} addq sh1@gottpoff(%rip), %r19 + {nf} addq %r19, sh1@gottpoff(%rip), %r8 + {nf} addq sh1@gottpoff(%rip), %r19, %r8 /* Direct access through %fs */ -- 2.31.1 --_000_DM4PR11MB5487EB130EE457CDE8EE2B66ECD32DM4PR11MB5487namp_--