From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2086.outbound.protection.outlook.com [40.107.104.86]) by sourceware.org (Postfix) with ESMTPS id 215AE3858CDA for ; Wed, 11 Oct 2023 09:17:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 215AE3858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=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=heoezFSTnMapq8TZ11z06N8szFGnbnf+ovw+uZcCC2w=; b=GUTbLZGwCVJ3xSbjPn1ARTzZTXxlZjDy53ILRaN0kMlrx4KZ1uIjZZaUDT+ZjInbJ+T6va4nqzS4B+OHSb9fIPoJ/xM4OumIBiGQUF60VrA1xkFPiV3vlwQdUGJEIzq2m7q4TqXLMZz7+fmP0qfeX3y/wNOg+Kb5oRvsnD1g/ZI= Received: from DUZPR01CA0323.eurprd01.prod.exchangelabs.com (2603:10a6:10:4ba::24) by VE1PR08MB5869.eurprd08.prod.outlook.com (2603:10a6:800:1b2::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.41; Wed, 11 Oct 2023 09:17:22 +0000 Received: from DBAEUR03FT031.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:4ba:cafe::4e) by DUZPR01CA0323.outlook.office365.com (2603:10a6:10:4ba::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.37 via Frontend Transport; Wed, 11 Oct 2023 09:17:22 +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 DBAEUR03FT031.mail.protection.outlook.com (100.127.142.173) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.27 via Frontend Transport; Wed, 11 Oct 2023 09:17:22 +0000 Received: ("Tessian outbound 9aeaca65ec26:v211"); Wed, 11 Oct 2023 09:17:21 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: f427d5785b6c65b8 X-CR-MTA-TID: 64aa7808 Received: from 52a5910010c0.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 7F3189EC-5933-48C3-A4DA-D49ACE3D530A.1; Wed, 11 Oct 2023 09:17:11 +0000 Received: from EUR03-DBA-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 52a5910010c0.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 11 Oct 2023 09:17:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YCJPp136ZoSu95NZ1OyBze6F/05lyR88RB2hWgO+hxfk5z1OTflkKKW5DeTejhTGN492ppF4p2juiTiu9rNm9lkIXjBQWucHsLmC6tORgOB6VqUfRH+Exqbbz7KY+N4fhaCfdCVCWRhrESv/od8ZHQEw3q+ffoy9TBxrzAjCLn24km9dz8I535UtIC8TLUa4R0fVQTQWYgeg2RU36rFXVSOw5wV0zl/d7bq+dKVydafHRihZrG2QlrfPMDQFLndzr2j0zKHYmgLPmJwFnLGyrn5b0HZpu5vqhamkXKN4PsgsNckwjoU02WZBjKw2i5BX3fFlWc8wwmoh14lhlJS4YQ== 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=heoezFSTnMapq8TZ11z06N8szFGnbnf+ovw+uZcCC2w=; b=ikkxssvDK4FGhaVHbd+bkSbwqMxAASmi7Ivl8ofiV1aG3WmQf7fFmxgxfTUK8d5+RYsjFwufC5tWOPECnFvlZRL1WEnsaMNnxHpRF9crhyW5m+2bDD3NxBPnqIigoCcR+GWwQ2FvwRW5fkEvtBiCQx9/8BTQKHscNm9p3hMgmf7JVtsufnW3VdjA5GSFgQBCir2s66SWk3qeH4qrkpJhQqrDxUE9SvPYTfEA8iI51BX/WzII5R9w54meTkOsY7O+GXp027G4wJZAz4+WWfoAt4Nx1eqG7BwfyYUFkITVjB3Wih2llJym29i7nNUvgF2fwUVPZIqVK+d3hoK1QEW9Sg== 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=heoezFSTnMapq8TZ11z06N8szFGnbnf+ovw+uZcCC2w=; b=GUTbLZGwCVJ3xSbjPn1ARTzZTXxlZjDy53ILRaN0kMlrx4KZ1uIjZZaUDT+ZjInbJ+T6va4nqzS4B+OHSb9fIPoJ/xM4OumIBiGQUF60VrA1xkFPiV3vlwQdUGJEIzq2m7q4TqXLMZz7+fmP0qfeX3y/wNOg+Kb5oRvsnD1g/ZI= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6678.eurprd08.prod.outlook.com (2603:10a6:20b:398::8) by DU0PR08MB8687.eurprd08.prod.outlook.com (2603:10a6:10:401::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.41; Wed, 11 Oct 2023 09:17:09 +0000 Received: from AS8PR08MB6678.eurprd08.prod.outlook.com ([fe80::3880:6a2c:60e:3f3e]) by AS8PR08MB6678.eurprd08.prod.outlook.com ([fe80::3880:6a2c:60e:3f3e%7]) with mapi id 15.20.6863.032; Wed, 11 Oct 2023 09:17:08 +0000 Date: Wed, 11 Oct 2023 10:17:05 +0100 From: Andrew Carlotti To: Florian Weimer Cc: Andrew Carlotti via Gcc , daniel.kiss@arm.com, pavel.iliin@arm.com Subject: Re: Function multiversioning ABI issues Message-ID: References: <87pm1lwn4x.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87pm1lwn4x.fsf@oldenburg.str.redhat.com> X-ClientProxiedBy: LO2P265CA0410.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a0::14) To AS8PR08MB6678.eurprd08.prod.outlook.com (2603:10a6:20b:398::8) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AS8PR08MB6678:EE_|DU0PR08MB8687:EE_|DBAEUR03FT031:EE_|VE1PR08MB5869:EE_ X-MS-Office365-Filtering-Correlation-Id: f8762018-fff6-4d60-5c8d-08dbca3ae02e 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: SvDLIPQLNaLvi2HBJZedFMsSTcLtl9hWluF4SRdjWjLh2eoFMo2rFRYY7y28VdvY3y4nrap2jpxJz9uQtgIk+7VYTTO0B659Qc7JnyZ8DA6vGtBWalQqRY4uKxvkp7B+4jUHbFoB9LuAJxI22NqxIh0wrq86jJ8wLJvWcjNSVIXEFEp5hZyZNo6zyB5INEeRNZ4KgvmNfST6cje/1w6dJJp2KJrK3w6jSC5LN2mYv3viu+6AjiF7Z6qHnIijqhTPJo/OoizxsP4Y4aA0Nc+JqcsTgQ/N8M59yhEyRDljtvrHHvO7CIX+QrhjZUSM/48UQqdQKWImIDT3LXd5dC5NMdsoX0mqhmxViCgyp5X7MftIeqAvZ+an0LZMtYYn/HEwf63mlwe8kvfn1UP9nQjH2vopdIj3R4DH25D0zQn9sNszRd/UIL2Oxk0ngsykWCuAgoUvByIvh5XanUkC6PcBuyiyuqB8cvMr+J9W8kGPtzbSD2CM9wUnornxAxBN0iNco6h6jM1ALy8YXTgl3f45KhQQST6nO3+KXK5HRk/Wy6Esiy+MVbwJnovS5hBrlIVS X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6678.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(376002)(346002)(39860400002)(136003)(230922051799003)(186009)(64100799003)(1800799009)(451199024)(31686004)(66556008)(6512007)(86362001)(38100700002)(3480700007)(31696002)(2906002)(83380400001)(44832011)(6486002)(6666004)(26005)(478600001)(6506007)(66476007)(8676002)(8936002)(6916009)(41300700001)(4326008)(316002)(66946007)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8687 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: DBAEUR03FT031.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: ad6817e2-8d29-44db-9081-08dbca3ad7d3 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6aw+2kJi+39KaN2RMJMmhuyfQSDQMs7KEnIe1RS9GnsUKc9YE6EDp+z48gUndH7hcrgghytBYGaZmGNuwKrF6IE1dzXbXZwujdMtr7pwhCOHzNZaEzkBDkSSYSD5eHXulOASImT4zBuvUvXVWSPpT5zFcnSLOBJvjFhMp2uqeDyScfJapzztzJgvX5gf0gQ+bYJ+z4Xe/M/pTKCo20m89oPX36dGQHjrAiQM7gjSi4uJzii3tkRPVLp4F98K3SXGH9h1pvBsB8Z+z8XyMypMeEY5yRssdIRIQjlxTh0uA+f+bda1XVVppPe8psDFTfuKI2umGAwv4CyTCeWEZnctpogP2jjIKtnjc6poYRvMkpQw3cOGFVNaqCRsMXrrpjkONIc3UXbG1ooQFly2wihZBD40TCAPNTclUMlv4uFjXrh9wNS0vAnCOxIR67CfhhemYbWDnhvSKjS8S+MJgXT2uv5U7pkIsKAcDKMtWYDRNczoOTHuPe6u+HZ5V+cbOo2Iuc1hnGpb8PqN9YdcsxR5EIQ2vYJicXGXQuNNbKIqbP+D5uz9DwWYp6Qm1z5fRsWsI9pnq1oz2BAIFjC95lRn8wwfLNhTgWhVNkw4lcEvxJ+ROanpMSE3p/Ux+IitAF7Dvf6c0/s1TZldJ7F8s9iSlZ3kMttFpG5Rw/3rHpjlR6xCBPj7qh9Uj6TYxBXQnCk6QlNvAy3TcMgLEETyXw4wcqyVQtv15K/Q2hpkx6EFEd2IM7Vhk+FbfeFKU2xeteNX 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:(13230031)(4636009)(396003)(39850400004)(346002)(136003)(376002)(230922051799003)(186009)(64100799003)(1800799009)(82310400011)(451199024)(46966006)(40470700004)(36840700001)(31686004)(6512007)(40460700003)(40480700001)(86362001)(31696002)(81166007)(356005)(82740400003)(3480700007)(36860700001)(336012)(47076005)(2906002)(83380400001)(6486002)(6666004)(6506007)(478600001)(26005)(8936002)(8676002)(6862004)(4326008)(44832011)(41300700001)(316002)(70586007)(70206006)(5660300002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2023 09:17:22.0637 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f8762018-fff6-4d60-5c8d-08dbca3ae02e 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: DBAEUR03FT031.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5869 X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,KAM_DMARC_NONE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, Oct 11, 2023 at 10:59:10AM +0200, Florian Weimer wrote: > * Andrew Carlotti via Gcc: > > > I've also seen the GCC documentation for the ifunc attribute [1]. > > This states that "the indirect function needs to be defined in the > > same translation unit as the resolver function". This is not how > > function multiversioning is currently implemented. Instead, the > > resolver functions are added to the translation units of every caller. > > I don't see how this can happen. Do you have a declaration of the > resolver function in a shared header, by chance? > > Thanks, > Florian I haven't explicity declared a separate function. I just included the normal function multiversioning attributes on the function declarations. If you don't include the attributes on the declarations, then you will get one of two issues: - For target_clones, you would need to ensure that the mutiversioned function has a caller in the same translation unit as the implementations. If you don't do this, then no resolver will be generated, with all of the callers referencing a non-existent symbol. - For target versions, any caller that cannot see the function multiversioning attributes will only ever use the default version of the function. This also applies to the current aarch64 specification for target_clones and target_version.