From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id 371443858D20 for ; Mon, 11 Mar 2024 15:34:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 371443858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oracle.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 371443858D20 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1710171246; cv=pass; b=tSlN9MKyizETz3Xt+RjD1XXzBmLCo8NJuKuJaGfyxVowMEEVR1k1WOjsb3/lSDnTXSVeJtq1u41KyKt7U4/fDYmlIhCs0Dzq7al9uG8q2UuJyFEDD1w9SMJs5e/g1gKIKLFIhWfz4FtAhPQsDRzK489Y+zPG4LmsydH2hNtD13I= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1710171246; c=relaxed/simple; bh=yCprorewemY2S2t0Nx5oI+mzruYev4RVswfo3Y1eT8I=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=IDGHR2d4EP2qQsybOxVBMD1FPF99Py0CYiOn84dMxnR3eF8qFZf9lzGu6bSTKaAJr2yJjgxl6o3kBxNWZCTz3Jhd4syvGp7wBw/Kx3lN+hSIMVh06ZLjbF9/3eGnyevsIu5lT3e4asDhR6A9Ckf2IMLNlo0bbGEEURe/zQouPQ8= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42BF49Gk019388; Mon, 11 Mar 2024 15:33:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : references : date : in-reply-to : message-id : content-type : mime-version; s=corp-2023-11-20; bh=tt1UGlpsL3Y6Wj66vlIf0NFDVCc/I15qIcT3AdpUAdM=; b=TFItphrtjk3v2GOorhRUQJmGuQ8pV8s5nuQXlPA0w/z1Xr2Rj3gQH6+DwgUMpxNj1bwX FnKEGYbpuPISt8oDwJwGYIie9N+D69DP7fWUXMulhRU8BynfcCSnEdJ7Kjpf1XwXzE2Z daaS+r+NTJJeYk3I8L+CG/+8n2HAuvizChketYOzW95hm2A/rRBZPxaW94+2gwr4F8OO wZtEfO1E2y44XToXHaOJOipIkhK8F/U1nbvSVEZIWQei4xypvMVmWmOi8oVjCZjeSv5s xwmFEKhTXUahOzVqlhmP20KL3tSdtWLY5KTEZ3kqbqtpvOWfsDGIppIxidmQJEYJFNDf qQ== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3wrftdbp1w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 11 Mar 2024 15:33:56 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42BES1WF033727; Mon, 11 Mar 2024 15:33:50 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2168.outbound.protection.outlook.com [104.47.56.168]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3wre75ntpv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 11 Mar 2024 15:33:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QQ+FdIk+HmZQp+xatbHqVHMWoi8ym0eiX9B7D+hav80yx0os7ubNNKAiXW2BGCV0jjFPzDbXAWp8OcKmbfgtGW09Jpi6KtOIWsWbfoUeuWXpdvIvrrByV5PRR6fbVx9VH8ejjFlQiivBfP0p4MmHBF1zsP4Xl+7t8fnccIIxiavZdVfC6NHj6lW0ZBaoFu1kmIgfMOdTaIyJ/5DSecroxdcSvAC3dbeQLcRNXvVtiAinNykNVqMs2SSdBR5jMss8jL6Ft4CJ8doN9B8f+SZuz5jondNIBA8uPh18FWkHjezLjrgj9oc3MNTVpHRcETdqncG8Y6jiN+nRzYalMoPklg== 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=tt1UGlpsL3Y6Wj66vlIf0NFDVCc/I15qIcT3AdpUAdM=; b=P65TzfyaJxbgJwy2zP8xxYMhqGA1jYWsybQOFJicIhFn6sSriP81RgVPl0unpVn4pVC4fUNjvrQEQEx1Qrc4L4K8fyEX4st+TUEeKYxFo1ZrpsI14o53GoDwCj/YQJKg93tPoKJY6NUWZRrRw2qVgHkj+CwRahAfgZyqgWQ6V7DXC+r7oUP058nvSCBnZaYHZetHs/TuU1GzXVXjztgI7fDPtuhC7xukijVNlnLTlJkuK5tRhcmecB/eqSGiUECtPD8f4liIkES4WsQzR/7JU9+jaFCHp6CrMKkOVlcYgN+aand/BwI7EHg9AkDg5IGXwcai3MTRZHViv4XNtdWKGw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tt1UGlpsL3Y6Wj66vlIf0NFDVCc/I15qIcT3AdpUAdM=; b=JMgOwVN1wtz6Mbhk9G+X4UirHNqT6+CivvPNfA2cavrgSBswOYCnVrQBaTxgrp6b62No9teCJZbZCBwEnWlyFJR9TF4RFa2QgpS3EGprkl/G8B4z34NomN0KCdSz9EdomQStaGQ/SyYYnVqQzliBr0EK5Ej00WLawOIJo6GHPpU= Received: from MW4PR10MB6608.namprd10.prod.outlook.com (2603:10b6:303:22e::8) by DS0PR10MB7126.namprd10.prod.outlook.com (2603:10b6:8:dc::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.35; Mon, 11 Mar 2024 15:33:47 +0000 Received: from MW4PR10MB6608.namprd10.prod.outlook.com ([fe80::67a4:9544:7249:7751]) by MW4PR10MB6608.namprd10.prod.outlook.com ([fe80::67a4:9544:7249:7751%7]) with mapi id 15.20.7362.035; Mon, 11 Mar 2024 15:33:47 +0000 From: Nick Alcock To: Nicholas Vinson Cc: binutils@sourceware.org, Sam James Subject: Re: [PATCH 2/3] libctf: Add comment for conditionally def'd sym References: <87jzmjl5ah.fsf@esperi.org.uk> <87wmqije16.fsf@esperi.org.uk> <19b9bf27-855f-4abd-9f9a-a021eebd7ccb@gmail.com> Emacs: no job too big... no job. Date: Mon, 11 Mar 2024 15:33:44 +0000 In-Reply-To: <19b9bf27-855f-4abd-9f9a-a021eebd7ccb@gmail.com> (Nicholas Vinson's message of "Mon, 4 Mar 2024 19:37:43 -0500") Message-ID: <87r0gg236v.fsf@esperi.org.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) Content-Type: text/plain X-ClientProxiedBy: LO4P265CA0281.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:37a::13) To MW4PR10MB6608.namprd10.prod.outlook.com (2603:10b6:303:22e::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR10MB6608:EE_|DS0PR10MB7126:EE_ X-MS-Office365-Filtering-Correlation-Id: 25400120-fd9a-41de-ba65-08dc41e0a500 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iHqXuStIOgjMCQg/Ficjkk7XFVosDrUYgqn1VU/2y58AK1N/87q34wKzGNJb7LbNmUJJmHG9JMBgn8uIXG0mR+R52HYCMbejtNNPamgRZZeYGjjRPpISEcYSYNKwtHODhiRCtifB99qZJC3frMgF/lzZWQzdxS0LHZ2bFNgD7FT3Gjqzo+FxaADurbvSmUc3Sq9ClMr4yFvl5Pfp3Jc7X2Qzy+ttg2AVDjBZ/53PfIeqR+uwz0ABaiIKdXnNIVBSyFhPTS1UyodT9SPjVgX1U8GQ1/QiNvap7u0XNv2pBHuXvWCy8HrTDqXV2/FtiE1Auq4qlWa3E+kYAvBwOZvh9ytYIfxybeqoVMySFO53lkBTbzzjY0W34TefGUJV+cvjiJ7h14YbLUO7EfDCx6abXTBod4N8VLnICQT1YSQ3jYWytFUZA/4ZVZ6ZhPf+eY4VNn19YgAXWBB9gWGWYxmvVpy5vvj4AOkyFi2pjf2gnKC2IKGz1LDEZ6epGLuO/wNf5VGdvrwBS6W2AJY9IqInyZ+cUR2slsRGlsIp8ynARYw7fOSzmj1uhe5XLsiZLuEfQod3DPzAu8vdGiSZfPWR67uu2vI3sVhoEpDsM/3GfWka/3z8nmapZRUFn8iNEYV4rMOFU5U/M0xWDzWwMPqFwBRHWXYu4+rrW4VzHIGQmKg= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR10MB6608.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 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6HMSNcOJ0hzX7bB9ckt1SOHPmQp0oq8kblTWZOgFut1OqiQiEx4nwngNge9?= =?us-ascii?Q?wyZ5cSb/EIYwCwuGsQgRTCDwgMDwf7k+xrBhsWA1t+m3pnigsFighYflF9N4?= =?us-ascii?Q?YZ7ru7D2hj+MnlE/Uzgq5lqn2z+2oVZHxvMj8l6mee6CjijEqAteaJ9IZjgr?= =?us-ascii?Q?nIIULdav9G/+xciOGrGfECM8OfjrpgguMeQofxG9dRBtncrspaDVqyOWVFiI?= =?us-ascii?Q?x8T6UTkOcmZKpTnpC7HCmz7lWBR6fFvBK4jwjdm4Vvt1P/uNt4x3gHTjSCSa?= =?us-ascii?Q?4oX0tJMWd5zKffQjdHmdcB5qHkfeDE3zzT/Dqj0dZTpGdMUVeEleKl2KSmw1?= =?us-ascii?Q?bs1I+3nppgf6SZQ7izYjDUnjECMi0V0y94iAu2eDMKphnj4OTst5MlUfzHwF?= =?us-ascii?Q?K3KhBBMoUBKHTvU7sjAgS6pGL8LGzVVItsTEAuJKvnF2bsE1gt6tXAdWR2bD?= =?us-ascii?Q?rk1ZTqVVyldHKBqqzy2v94HzWoX+81FQcsLZ/PoBrrKar4RkGogFEUQln9JT?= =?us-ascii?Q?4IH5+Axre1DX+MZKHKr68fMgkaaRDWJ8d86u4bIFn+3RFFXbyPl3Fwp/VVEg?= =?us-ascii?Q?lRllpXn/4Vs9U5bq0alhmwSwhEFQmzX1v6G+ZMglKWLdmGGQBBN3msTpWylg?= =?us-ascii?Q?H8F8DON4qtDToR6/PZXC+kV4dpPV/7di5nwjNL/oked8+25daDatpoScdqpd?= =?us-ascii?Q?XlUHneZKE5vGuXaadTz/Ds8wr0PPebxFEuDzomphS5weivZMD41ZI3Q0AbEk?= =?us-ascii?Q?aA=3D=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: TahAs+cAXiT0+mSI5hXfiW/vGAKQQINgk1Z+AT7yWQf9oo9EB2Atsk01Te753IhJfCfqA55UTcTLzcdE+09JUCq+YcH2ZV6tsab8ntrXuRFFjIQxiiVUtfJunyGmB/rMXJVbXbpDSB/Jx/h0c2d9EbI1C+s4AiZtAfyuhZRuCxqbWEsxugJnE+tQaxM+671Jyty66vi2IoOHfTYEgTRzfSrXSWqavoIb0d0dY5AlzrOPKejAbvruzhmyXEj5w51YHVzAu8l1ToTtNFnAm5i3NW8eHD8dzalQ920m0cFdHUMQhMTug4RkkeVYDCenLdhvUZTZeVc0n6VgDmKOY3oN+uaYo4YeS0VOsidIonXP0z8Jb38usC0aZegoPEz2WUsQP8yCbUx6LLmcpCuDxDzMEp+nCHptisjjleWh0aQdEEElTgf0yE8LA80X7S5hnuCa/pa7jlRDG8MVDQ/czTXHBI3qukxzvb8czsBvyO6VrvNZxD8LnGxv5/peDH2RvM4y9fAN6ku7+EmJONZIzvg+ckgZeUx+VOOD2EaokPvF37Szyxcz37zxajHvpt0dgrdYWau/9ZTG/KLghDyJUsSaqFN+vzBEQlrME9tMEjrR8Ks= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 25400120-fd9a-41de-ba65-08dc41e0a500 X-MS-Exchange-CrossTenant-AuthSource: MW4PR10MB6608.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2024 15:33:47.7598 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: kQd+YgKMp/3i4HMirjyCAJuUE4XNzjBJs2X5SP/HIr20jrRE4wECT3CAMpjmbmZi4XL2uxLaYE9Pz9ZhRF7Y9g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB7126 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-11_10,2024-03-06_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 phishscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 bulkscore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2403110117 X-Proofpoint-ORIG-GUID: KGHhcW-f5u3g99B2mtVNSS2DYDseahwK X-Proofpoint-GUID: KGHhcW-f5u3g99B2mtVNSS2DYDseahwK X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE 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: On 5 Mar 2024, Nicholas Vinson spake thusly: > On 3/4/24 08:57, Nick Alcock wrote: >> On 3 Mar 2024, Nicholas Vinson said: >> >>> On 3/3/24 10:10, Nick Alcock wrote: >>>> On 2 Mar 2024, Nicholas Vinson uttered the following: >>>> >>>>> diff --git a/libctf/configure.ac b/libctf/configure.ac >>>>> index e4e430615bd..0494a537e78 100644 >>>>> --- a/libctf/configure.ac >>>>> +++ b/libctf/configure.ac >>>>> @@ -258,7 +258,8 @@ AC_CACHE_CHECK([for linker versioning flags], [ac_cv_libctf_version_script], >>>>> CFLAGS="$CFLAGS -fPIC" >>>>> AC_LINK_IFELSE([AC_LANG_SOURCE([[int ctf_foo (void) { return 0; } >>>>> int main (void) { return ctf_foo(); }]])], >>>>> - [ac_cv_libctf_version_script="-Wl,--version-script='$srcdir/libctf.ver'"], >>>>> + [ac_cv_libctf_version_script="-Wl,--version-script" >>>>> + decommented_version_script=t], >>>>> []) >>>>> LDFLAGS="$old_LDFLAGS" >>>> Not quite. The stanza you changed there is meant for GNU ld, which >>>> supports both undefined symbols in version scripts and /* comments */ >>>> and needs none of this hackery. >>>> We have a three-case case statement here, with the final last-ditch >>>> attempt being -export-symbols-regex=, and we need to add another case >>>> for "no -B local, doesn't like nonexistent symbols, supports >>>> --version-script". >>> >>> The three cases are not fully independent. The first case defines conftest.ver and conftest.c in such a way that when the test is >>> run both ld.bfd and ld.lld pass. As a result, ac_cv_libctf_version_script is set. >> Yep. >> >>> Then the next check is if ac_cv_libctf_version_script is empty. It's not, so the check with '-Wl,-B,local' is never run. >> That's why I added 'nonexistent' to the version script at that point, to >> ensure that if the linker objects to nonexistent symbols in the version >> script, we fail that test, leaving ac_cv_libctf_version_script unset. So >> the recent-lld setup fails that, cascades into the Solaris version, >> fails that, then hits the next case, freshly added, and passes it. >> >>> Even though ld.bfd allows undefined symbols in the symbol version map, >>> I believe it excludes them in the libctf symbol table. If that's >>> correct, then I request this change be reconsidered because it's a >>> much simpler change that supports both ld.bfd and ld.lld. >> The *test* is simpler, but it expands use of the horrendous hack which >> involves sed-transforming the version script. I was trying to minimize >> the number of cases in which we have to use that... but I guess if it's >> increasingly a lost cause to do so we could move to doing the >> sed-transformation everywhere that supports version scripts at all. It >> would certainly simplify things a bit (though not completely simplify >> this away, since Solaris still needs different flags as well). > > I really think using the "horrendous hack" is the better choice. ld.bfd and ld.lld both support the --undefined-version flag which > also solves the problem. Unfortunately, only recent versions of ld.bfd support the flag. This means, of course, configure.ac would > need a check to see if the linker supports the flag before binutils tries to use it. > > Furthermore, I don't have any way of testing my changes against Solaris linker(s), so I would like to minimize the changes I make to > Solaris-specific checks. OK, I'll whip that up shortly -- as soon as I've got some *other* backlogged stuff in, and also figured out the cause of that ldlex_wild problem I believe you ran into earlier, since it's now biting all my environments and seems to be fairly easy to trigger. :(