From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2116.outbound.protection.outlook.com [40.107.105.116]) by sourceware.org (Postfix) with ESMTPS id 5ECDD386101D for ; Thu, 18 Apr 2024 21:48:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5ECDD386101D Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=microsoft.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=microsoft.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5ECDD386101D Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.105.116 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1713476891; cv=pass; b=Vv8hKvhJz6VW/d4MwCsBq0KJkINZ+oLDYxxe74+43/Jwn6lqOnrnHrKC/lX4VEEMkCTDHc1AGpk/Fze3W9tbpr6AXZtEMDDX9/pBHQHJQTWR7W3LGgfgfYrHEMkyFNJL1hc0WXlqGO77lmjYYLzW6qA6Mk8RKV+dg68KAFVHaPg= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1713476891; c=relaxed/simple; bh=rA8Tzjicg+9am7K+FHhcGSDq/8dMvU8qLABpYt9tCoM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=GdVwpfE9CqefgetVUZGDyfmohgzv2yyXY2sZZn+QkIDKL+or+pmXo5qlvf8Uu7A+oBPZ0OOF/zLwTC3Yo2ruRr+sk3SHCX5BUePexXXeqShwV9zWL5yZXFygQT6yg4Lrnd1r139B2jMV9VtRAK9MXwjRB3ifyPxgxp7zhIxvEw0= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RjbHDVD8UTPdY60gaj/xDq0kCdnvteVNtdfpSng7l9gzCem3HP4E6mgF7TqjXck+9yNeAZHEyPqO0dg5xyb9QnVhFXV/fsOrZoZl7bsBJwCdZNf+j3AeIYkgOPXrFKtO+D9V24J5t3C/CAUPDOM2N35fGbyVVeuU9svC4H+JDnOd9MB/9HB8oUZ2mBWSER6ouaOTter+PsSTCiUzHF0lUhZ9BrBJWkdhq2PKQv9RtoacH+jHT1LEZGhxjU/IcO152JBvlJYCYJuE4CZ5m7ULiz+8ZjAr3bPrmiQzav2NLVgKnlyWLkSM3NzqxoAGrwOyW+gDs5/rfr69pYDiYyBs0w== 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=Oem8EmIK0B/WV0aE79239FBJm4m7GF2ChLgXmZ50Gyk=; b=hvQ3iqJ7Oj1OgU6247nuHm9Ccho+Pfi0avpH/7+v6nmMTaKLoyXznDf1k1qKe++yubEPYgLVO0SlkBJkc3IPdPuI/MRfbE22iiiOK2okxcEvBxYjf4NxWnmIAK9QPdhpLJdgTHu4u/ZANBLq6G6b/YeULUBTmRB4w6hWJQ6QNg+MuHmgy/fiFS7YwKIdgdMFGCEFz+tHQefq2u6uoHjy/C+sL9S+/oo25jS78COggdt742Y0oqfu5P12gKS+y+VOXfG0WuYnVZuOmZxoEGwfCXXdy4xYh21LkZXV3diOsurb93VNw9XB9kvBHtbVo+JYb2mnwod+uS3YD8yy86LpaQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Oem8EmIK0B/WV0aE79239FBJm4m7GF2ChLgXmZ50Gyk=; b=hoptd/+iJv/PUm/IYtZZPFMW09EWRgRYbAKbkZ+iHUT6pyCvDXPmmtoGMZaw4NYwsOve+wmlpZyhw9evQbAYcMlM4GVDuCuH5lzKuiEgAEvBvQRm05sZo1OtljeASUhI1gQH3cXtKzXliAvVzhgqrKxYbxQyXzFsGk5sWZzIstI= Received: from PR3PR83MB0425.EURPRD83.prod.outlook.com (2603:10a6:102:5f::21) by VI0PR83MB0695.EURPRD83.prod.outlook.com (2603:10a6:800:218::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.14; Thu, 18 Apr 2024 21:48:07 +0000 Received: from PR3PR83MB0425.EURPRD83.prod.outlook.com ([fe80::2303:5667:fa24:79c2]) by PR3PR83MB0425.EURPRD83.prod.outlook.com ([fe80::2303:5667:fa24:79c2%7]) with mapi id 15.20.7519.014; Thu, 18 Apr 2024 21:48:06 +0000 From: Evgeny Karpov To: Evgeny Karpov , "gcc-patches@gcc.gnu.org" CC: "richard.sandiford@arm.com" , "Richard Earnshaw (lists)" , Maxim Kuvyrkov , Radek Barton Subject: [PATCH v1 5/6] Adjust DLL import/export implementation for AArch64 Thread-Topic: [PATCH v1 5/6] Adjust DLL import/export implementation for AArch64 Thread-Index: AQHakdoYSatMVzxJ50qI6vjj4Kv9cw== Date: Thu, 18 Apr 2024 21:48:06 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=7edbbdf7-0382-4215-8fdf-996305ff5b5e;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2024-04-18T21:26:39Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PR3PR83MB0425:EE_|VI0PR83MB0695:EE_ x-ms-office365-filtering-correlation-id: 76307a13-041a-4b94-d74f-08dc5ff13b48 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230031|376005|1800799015|366007|38070700009; x-microsoft-antispam-message-info: =?us-ascii?Q?xfW37JUIFSJaUdiRv4Pu1aAOnzm/gHlRfteWN1aGjg3G6AWNbrf3F8WEQCEq?= =?us-ascii?Q?/s/ezilBzRyQqYxur+ceJdDv7HvwfziKi4vIpx2YUNcaykxRgA6lY0qgQy6F?= =?us-ascii?Q?k2ghdFal475h088tVk2WKIzS7A2XV0uklaG5iivS95Wb0Nye136+jHnZKRNI?= =?us-ascii?Q?oyCUS6z8faXFQ7lyWxxKqPH7Nu6X5ThA08+YtR5HmpcnyQHuUBfpMRpxIURc?= =?us-ascii?Q?GRxVOpxWDAo0JR4RGJLsImROFQLcpHoUKVnf7sWEc14KFYxB3/qNO60aaHhJ?= =?us-ascii?Q?Q26UpXnkrH6mQtzwWB9FhreEGGuRDNeYhuV0gcK/Gk4q9S9MmuMqQO/Zh4Zh?= =?us-ascii?Q?u8cCmCRkZhJvpFBKWdA7LVlcgNH87KkeCVd6ZON8b/9UQb0J2amLxkk8iN9E?= =?us-ascii?Q?O7TmQSApyFlqBl2yJEt3DM88Fm88iDb1YoN3IO3WnCfTcD6wM+aUEHOsZ4/y?= =?us-ascii?Q?RedCMZJCZaxJQtaEucLm+2NzjKbbcHIpcQTm+tt4Co/FQPidW+jIAXrn9iRg?= =?us-ascii?Q?d9dh4EGiBzK0K1DODK38aqXMtsjlnoaUkhEnArePYquA3vUSmnw+bCsPvvbE?= =?us-ascii?Q?pAYngR99hlL0LEMN9d5wTw0glKbZdu2uitEg267GZD0fUY2Tl6oTs+t0W4Vl?= =?us-ascii?Q?1L5qfe6hHhX8FOGStmDdDQjBdAwepXk7MK/kWfiu5y8/s9JRtEw6KTAay8e4?= =?us-ascii?Q?pRjuY+CogqUJ8XO3ZVpCZtRRBz22CeS5ws6qMSKEHfnmewqtWEAq/eDSdxth?= =?us-ascii?Q?0xc0k0t20l5+5NtBUnfWDZLghWSiLiwi2ZwniDTrbd4D5R5wlnjnCZGqcgn+?= =?us-ascii?Q?Ewr2iU0FXpPaZzTH5+eVQ3VdRoYQhpxjlWQY/5CZw0PYBQMhGS3jkoq4IYif?= =?us-ascii?Q?VfO36N96WC+ykX9xecgqFgKSoAKs4TtjfoPzmPZpRTMUmP9dIAeawCY67+7k?= =?us-ascii?Q?znzQyIJvZkRigFc1dBYF+CsjQFsEwzQRmA+otEMLZWAhAe/ZsVban4ogTPQ8?= =?us-ascii?Q?OF7fsCtzh3fB6NLr+7Epw6tpnYrtglD8hke0PynVtn/wzgXtfvOSInOTmAi9?= =?us-ascii?Q?wYt5l+cQnmS8wDmMM6TDCpa6bMhJL5Skpa1I+o80JP3Ix5kVbKZmlXM+ulPy?= =?us-ascii?Q?cBGAVEH01FiWsrekrv2tduwc+98M4DEpPfHhcqR0QP7gD4z5PbUm1bWbf6Vh?= =?us-ascii?Q?g/YITRcyOg5p84NOV45NaOzJTDY33tPaTj4O+FvUAsQ71BDjZVC2t03w7n45?= =?us-ascii?Q?QYRUpu9XrHVCgHgxdKmEDZYHtCzBtMmphG7CKY1Y3Epnfj92enYuDrbSdffz?= =?us-ascii?Q?CeD94/52sUn4LVfdLO0I9HIcRGC6MNQapr4iSZlExBD33Q=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PR3PR83MB0425.EURPRD83.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(1800799015)(366007)(38070700009);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?5LEqYSw0AaOzAYuKJuaV8CzA8zizBdILvfEn17Zk2+6DMn0b4h9Xo5pnViZl?= =?us-ascii?Q?AAbRfL/4zKObxIfpetEmD4MnOTgZzwoOFX1EAtylm/XZJfGlmeIr8LiyARtB?= =?us-ascii?Q?sd1rEkL0flb83G09S1S0skE9Fwl9G5+vuzEr2mhN+pX2uHZKR+2OFVi074xH?= =?us-ascii?Q?oSac6yYNVred75g+YApbSnEsNgfzggsIPahXQeScAtHh7eLpRiFNH619k7fb?= =?us-ascii?Q?En4zy+yb26insojkzGTL3mRoqV1YHyZ8XNVYqlB1czMbv9pP6fZ+fZXUdGhd?= =?us-ascii?Q?8loaXhDd47j4WkDA8uCvQ4TTiE59DrhqV+IUhpdWXA+98dhuNobnDBhke6MQ?= =?us-ascii?Q?VqV2TOlu+nFJe7S0aMAE+715oQya/6nm0sh/B4RD7AXda0rTKj0tl8T1eJ7l?= =?us-ascii?Q?CvabnU2iX6Mi7Ep3rIkKCFvkciUAtvmZe2hsolkslX/LHeOvlaUON/EX8lMv?= =?us-ascii?Q?odFCBfOPxUo3pBlTozdQl3nzUK3Xk8LBSx8NhQpgxPAIpmjW0Z48VO4RoJIc?= =?us-ascii?Q?FvSDMxuBawlllDVjXmcgcliUKYnYmHv0OEJWYh8XzuUa2NVpfn/sJN+x0S89?= =?us-ascii?Q?gp+qNXGIPwu0vsF06HSwMxrukahYRhszRzFYKUKrQi1rBSOpHOoOR45a7tRW?= =?us-ascii?Q?XfVh6m/Xfn1LKQ7tqZdftMj6etwlBbzE5oyNTw+BuwHIoeRqqWStK5h2tMq1?= =?us-ascii?Q?BkJlKOb0bH159j5qurUZwTajKqgCjix7wmDLyhSJoiA5ZkGOnbQmpHN0ZWMy?= =?us-ascii?Q?AHKbeG/a7Gl/wAY2nU/Eq2e8SdyT47r1+IkFCAVJdunHPdNgcuaeD9Fss5ZS?= =?us-ascii?Q?GprgHkL3zI2pXj8kHdsiX1I/ZQSYapHoE49RO4gpM4rN1DB6TNM6nevGeHOn?= =?us-ascii?Q?oM9h5718DKtdsRxUKNca1Spe8JJTjOkqZ37qQ5f4WNvj7dlN1GQmSBCcUiuW?= =?us-ascii?Q?667CjSj0Ie6hMHRTelaXgSNNU7gV+QnFrgLfdaA7cesxJiqKpGhWYRflwJNm?= =?us-ascii?Q?4FMbJden3GQ9aFKtyDVE1LrbzsTQ3DNrzKk9h5fsGpGIWkWl67UkBEvpxhh8?= =?us-ascii?Q?yo17WqMlXEk11mkPHXhBSmrTSarSHKjBU4GU6pdxn8Lhli/R+oF1p+HFwhqE?= =?us-ascii?Q?ZgH032BIiDjzOBBEYDnMKhkdoyhegRzQ9zk6th7UDbHXXH18viYyFwYowPyn?= =?us-ascii?Q?2BZOHy783P1sDn+uoqTChP7lfrEcVdAjLu8SUm0ImiiotgkBQacI9n+HSqBl?= =?us-ascii?Q?9Of7OxXLI12TZTYTRQgnr7c0STyO4lzwkhcTRAfJa8MupUBlQrDnE07zz2UW?= =?us-ascii?Q?ANQbt4LB1ytr0ZN7EzqRT0JWQs04X9HGSpa7qzRWQx/VBpP1S5xDf9BiRfB4?= =?us-ascii?Q?mzUJT3NSS6wkgasgArrGIjGPG+4AKaXSd6VyGmV5xGtzKUKGhvUDxM5WQHhu?= =?us-ascii?Q?v6mSVS4YJSsMK9cRQ1wnnA0KzS4QNmT9joCK9RuViJP8fYtT6lQ1paZWyQN+?= =?us-ascii?Q?Mh5udvikvLTHDdZYxPUwX6nWCa89PM9PLy+uZXXnkkrIltnbzNFjS5cmVXtg?= =?us-ascii?Q?ZDles37SAs91DaHG3aqotHo3DVn+ttJA06uo6AX1?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PR3PR83MB0425.EURPRD83.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 76307a13-041a-4b94-d74f-08dc5ff13b48 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Apr 2024 21:48:06.5970 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: rSBLtCYRmYWC8H3Tkl6AhGEmpB7RH39c/hJgBi8Lvd2TsBt5drD53WENI8I0GkkpQTBVU/VLPXdT4XjcDf7Oog== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR83MB0695 X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,GIT_PATCH_0,KAM_NUMSUBJECT,KAM_STOCKGEN,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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: The DLL import/export mingw implementation, originally from ix86, requires minor adjustments to be compatible with AArch64. gcc/ChangeLog: * config/mingw/mingw32.h (defined): Use the correct DllMainCRTStartup entry function. * config/mingw/winnt-dll.cc (defined): Exclude ix86-related code. --- gcc/config/mingw/mingw32.h | 2 +- gcc/config/mingw/winnt-dll.cc | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/config/mingw/mingw32.h b/gcc/config/mingw/mingw32.h index 08f1b5f0696..efe777051b4 100644 --- a/gcc/config/mingw/mingw32.h +++ b/gcc/config/mingw/mingw32.h @@ -79,7 +79,7 @@ along with GCC; see the file COPYING3. If not see #endif =20 #undef SUB_LINK_ENTRY -#if TARGET_64BIT_DEFAULT +#if TARGET_64BIT_DEFAULT || defined (TARGET_AARCH64_MS_ABI) #define SUB_LINK_ENTRY SUB_LINK_ENTRY64 #else #define SUB_LINK_ENTRY SUB_LINK_ENTRY32 diff --git a/gcc/config/mingw/winnt-dll.cc b/gcc/config/mingw/winnt-dll.cc index 349ade6f5c0..294361fab4c 100644 --- a/gcc/config/mingw/winnt-dll.cc +++ b/gcc/config/mingw/winnt-dll.cc @@ -206,9 +206,13 @@ legitimize_pe_coff_symbol (rtx addr, bool inreg) } } =20 +#if !defined (TARGET_AARCH64_MS_ABI) + if (ix86_cmodel !=3D CM_LARGE_PIC && ix86_cmodel !=3D CM_MEDIUM_PIC) return NULL_RTX; =20 +#endif + if (GET_CODE (addr) =3D=3D SYMBOL_REF && !is_imported_p (addr) && SYMBOL_REF_EXTERNAL_P (addr) --=20 2.25.1