From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80040.outbound.protection.outlook.com [40.107.8.40]) by sourceware.org (Postfix) with ESMTPS id 9DA2C3858D1E for ; Tue, 26 Apr 2022 06:31:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9DA2C3858D1E ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=dw7ZvmD5l/sbxJhotzs5MXJ35Ay9MPzfXuRoWTf/xgIkH7PqsSFBj0wcxZGgKuD97kfcue+ZYRrUNNQWjn208rayQ46JcTuObOaWxCwe4OzQ56gLuL6PIGQ7upZ4bfe3fY1jftpTrvoYiIe/g0nOQdXGRyuMJ4b7CTEuaWId9xuKafPIU6ppFj9wf/FOlAILlJy/Zf/RBbEI67fRy1gNIpX5GvHCDKiBjQi243jueR5VCb0E7BB79gFHYyoMxZkdzWzyPAVUKxx7TyVdDb7pJ1YrJ7T7pqbG03F3jkBNVAqDNlfolTmG0pE4hwfqLWu12ngv+ZC+/cS9ugFW14eEqw== 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=5mfk292hOas0ijPvgumMaK0T0BIvCEsHMQTbN89dA3k=; b=icTwgBaagSwga+U9Ge1FPdauwDtICJVxdtkZwRPXnXu0NaB/M+tw8b/MIwl1T56T65SHr0UZNgqFdnhnRMser5HXNHwuKKbajvZh3NmsrQ97ddGBajUf8m5GC2X1An0XSjcyaFvwZj4Dxe1/BKF/9jNRK3U96g/nGw8Zsw+tTj6DgLXXr/uiHwX6rjHc9HxIZdIRr/+r7PdHPUX1snzvuH2U4zRB+R5ywcEahQKnSmCYv+LtnNEIkUNEhuseTDyQJ9QZOsv+q0YX4FBw96WpRwUk7hHnDKUchDG2W/z5oYQ7rIrQeysReduEJquH0KLh7JFzQA/tBO97YTm3kEdyVQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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]) Received: from DB9PR06CA0006.eurprd06.prod.outlook.com (2603:10a6:10:1db::11) by AM0PR08MB3395.eurprd08.prod.outlook.com (2603:10a6:208:dc::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.13; Tue, 26 Apr 2022 06:31:18 +0000 Received: from DB5EUR03FT027.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:1db:cafe::11) by DB9PR06CA0006.outlook.office365.com (2603:10a6:10:1db::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.13 via Frontend Transport; Tue, 26 Apr 2022 06:31:18 +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; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT027.mail.protection.outlook.com (10.152.20.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.14 via Frontend Transport; Tue, 26 Apr 2022 06:31:18 +0000 Received: ("Tessian outbound ac9bb5dd84f6:v118"); Tue, 26 Apr 2022 06:31:18 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: bf3539d01c1ce8ef X-CR-MTA-TID: 64aa7808 Received: from 8189340c99e7.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id AF11AA69-E837-45FD-B401-50AADBC12F68.1; Tue, 26 Apr 2022 06:31:11 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 8189340c99e7.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 26 Apr 2022 06:31:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gS541xZ5NMVhgNYvi7A6PI3mBPa/z9ZG67RCe0halZUKzxn9oJ+W0wcL3K5+ogy45a1h2X6SDPh5Yagv6AhWYU29oaejPWCfOgX/5tRNJO4D3o5D9SWsqQLixXS3l8P9s7wdCwdn8T6r/mQhNjTshvuzQPN7buOzS0U0/XQavbr9dpw56bBpPTwW8CN0EwU1qqq4+vUnRMeABNN+px1hOfWroPdD9S35IYBH1zYkTODE2t9SyO1/hXisDNYLpfpeRZHULpkbSKMj4nuYNjKQFxrAxFBn1RsHx9gRNz0Ulqrkl+eqm/edwBOwbXIRkf7hwPbmZm7xOkMFKs85iHEJVA== 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=5mfk292hOas0ijPvgumMaK0T0BIvCEsHMQTbN89dA3k=; b=fhL4KJcpJvX3pWZ3TYt7v7rJ1vS1WYD2pjnfgakxii7QCbiWQv8rihWXXakeWPCqP+wlh1gXDiYkqi6+plj8dy4t2eaApcqdmZ9hQscH87kzNticpIUBD/KBUnsolbc5wtrk8UKRxSL5atvVhnpwm3a6Vox3FIHLHXeedvb1l1ucz74A2dHlowxdyPIwaRyN0EpArIHtNgyFIfjCW9zGbzpwcQ78Q2oaXG+UPrGMrMGGybrRbBE5zr4lWW57R72S9kTJV5NOambdDJP3ijMfoR0O1g940xUYxS3IGxGEp9/imNWT3iZQ2FeBxhzO7gCiQzlhJV5WqBOqtTNv0kDghw== 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 Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) by AM6PR08MB3974.eurprd08.prod.outlook.com (2603:10a6:20b:a3::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.14; Tue, 26 Apr 2022 06:31:09 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::7080:6233:cf8f:a8a6]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::7080:6233:cf8f:a8a6%7]) with mapi id 15.20.5186.021; Tue, 26 Apr 2022 06:31:08 +0000 Message-ID: Date: Tue, 26 Apr 2022 07:31:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH, v2] Fix 32-bit build for --enable-targets=all Content-Language: en-US To: Alan Modra Cc: Joel Brobecker , binutils@sourceware.org, jose.marchesi@oracle.com, vapier@gentoo.org References: <20220422132513.22471-1-luis.machado@arm.com> <2b02c5bd-1db2-f322-79c9-e6878adf8b67@arm.com> From: Luis Machado In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0045.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ac::21) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: bc471b59-664e-4f09-3417-08da274e5f1b X-MS-TrafficTypeDiagnostic: AM6PR08MB3974:EE_|DB5EUR03FT027:EE_|AM0PR08MB3395:EE_ X-Microsoft-Antispam-PRVS: 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: bWmsz4UlLkcnTj8q259S5yLBsXtl6kQrwrN0rHYCGyIWi1vaagueW9x0VQGEef+Pbb1rjZom5pbP/6OZI2IKtL80iGBoO8citLmPbBsMk/QHH4abSor1ToY9crcGcn16colSSvU9y728kcfwaDqjeP7UBHbyFGy2bIVsMicVFdeNB+DydKbFxV/xk00gStUlHt+6JXZF4UTaDUlOqzXuqPMxbb8Fg5OHl4DFkvEm+JczWo2Rwoq9Y3iVSONMEz96ooDC4ymollnqXlJFmb6gbbWklU0xMv/r8aTAl0oO52vjSffJPXbyioB1rxOWQKDpQSqAvPZFVsetTKR6iIYCaoQNqKbxwGfTJ4OPhAQMXVhm0jmgNK2NZRVE631xAbmLDuf3gyHHFFKeP77Z9FKgnnlj2If/7xkwMwIRPgAte/W+Gcr6aqWFQgARPgt+HJPLcrZXD1s0tdwuOy7YdlG5gtiNV78LhyTMlgXqs4ezWsPhOsgMAuOovR2suTrgBsrCc0TwnEjMNwmVWQ0JekmssPzloQL9s3VNMCUUg4vOYOK8CO7ys2dU6e1SRQXL3uipA8ri/xS7LKAHWTn9PsiQVmKi4BWP4AJv7bwmqzxktMb0VZP0E4nINnWZUv1SaJUriKHXHI8TbKE68Gri3P/lNhd/WKIuwYx2Map3WfH7Yfwn4r2TtsZ9iP12Tagob6A/6f4KBHBNXm+9QMrovKmoPf/pkQScRlI1cx2GFtMMIf3qQySz4fjJ+qeQ5/zaP1tnCKNHIqHXbmzUBRO41DpuKjL+e6Z35847oeFWkf38UnAGr7EQ+S5sbFRv0FfugtiX X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB3919.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(6486002)(508600001)(53546011)(6506007)(6916009)(966005)(2906002)(38100700002)(316002)(31686004)(86362001)(66946007)(66556008)(31696002)(36756003)(4326008)(186003)(66476007)(2616005)(8676002)(5660300002)(8936002)(26005)(6512007)(44832011)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3974 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: DB5EUR03FT027.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 75b81d58-fbea-490d-a20c-08da274e593d X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ho5SwMIRAXH0AMJ8f0HuO2aC9qJlP6qQKR6rRGhLEVA12iSo6KrUJE4lq1BkEDaWPLMoIjYmknSUEYDJDd4g82s9DQ0OxfwVZy+6fS+llcUn8OVgvlth1lQuK9EGYZHluFTg7cgkDaXCyqzBjObP4TvXdI6GlDV663Z3UmfQxu4a2pxaNWMgvledsrgmkFd6Aw6HCzd/K8nLkXgicd5O6xFHEJ9Bob6++vQkyAv0mdEwIyqxTAAOwDKR/TP1lko/qSZZphPnK3e/N0VOOVWrAaiZfLHlZzkEVkuWWbkKI/ndv9RevgR+bcxwd40UnBgA13ofKYlwwE7yLIm5rHc5nntMErL9gMwwNoylNaDZTIeLI9acTNMHXhRtDIKMqIRcJOvHfP1g3Eold+RGm+wfVRTMtVLD6pkGfOPgFt9LZ2EPjkWYNIM9AksE892i/wwcIdn9zckYqhhd/4j1p8y4C0hhR2Ogsp207CjljA0lBM4uBZOOziCUr7+rtAOLX4HsdL7twfzCcXIOA51qHQ0QjS6CTlSwHcvWA9VlZsKUXTHmQLa/W18SKsjbI+qDU0hKrrnjd2y9WR6U1tY3+uO2V9cs+ljKFUuZJYwxwCEnUUAQZn5jj/7Y7JrjfTNFVDudVXbonl7hfwCL+eBVUjrYHo4pZJkat9bARORCEcOlcVMsFwgFkcI2o5cujunk2N4BKrLSido2YUImViaACng928C3W5jmgaijJEJbKYsusOsFjtf3Lajacv1unE+hpBA7z3JiIl892WuVYTfROPTPzz1g705Uytf6BvCqsls5esA= 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:(13230001)(4636009)(40470700004)(46966006)(36840700001)(81166007)(82310400005)(2906002)(70206006)(70586007)(356005)(316002)(8676002)(40460700003)(47076005)(966005)(31686004)(4326008)(6862004)(5660300002)(44832011)(8936002)(508600001)(86362001)(31696002)(53546011)(36860700001)(107886003)(6486002)(186003)(6512007)(2616005)(26005)(36756003)(336012)(6506007)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2022 06:31:18.2822 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bc471b59-664e-4f09-3417-08da274e5f1b 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: DB5EUR03FT027.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3395 X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2022 06:31:26 -0000 On 4/26/22 03:52, Alan Modra wrote: > On Mon, Apr 25, 2022 at 08:40:54AM +0100, Luis Machado wrote: >> On 4/24/22 15:58, Joel Brobecker wrote: >>> Looking at this patch, I think you you may not have seen Alan's >>> comment, which je sent on Apr 18, saying: >>> >>> https://sourceware.org/pipermail/gdb-patches/2022-April/187960.html >>> | Anything that requires 64-bit BFD support does not belong in >>> | TARGET32_LIBOPCODES_CFILES. In fact, the whole point of >>> | TARGET32_LIBOPCODES_CFILES was to fix --enable-targets=all breakage on >>> | 32-bit hosts without --enable-64-bit-bfd. Why would you want to put >>> | bpf here? It's a 64-bit target! >>> >>> (I see that you weren't in the list of direct recipients for that email) >>> >> >> Yes, it looks that way. >> >> Unfortunately --enable-targets=all never really worked OK for 32-bit builds >> after splitting 64/32 targets. It is not clear to me if there are bugs >> elsewhere that are preventing a clean build, but right now it doesn't look >> buildable at all. >> >> Alan? > > The major problem I have with your patch is that all it does is sweep > a problem under the rug. While it may fix a build breakage I doubt > that it actually improves anything for users. For example, if I apply > your patch for a 32-bit --enable-targets=all binutils build, then > attempt to disassemble one of the bpf gas testsuite objects: > > $ ~/build/gas/all32/binutils/objdump -dr tmpdir/lddw.o > /home/alan/build/gas/all32/binutils/objdump: tmpdir/lddw.o: file format not recognized > Yeah, I agree. Doing some more research on the code, it is the wrong approach. Though I'm wondering what an appropriate fix would look like, one that wouldn't require a lot of work and would still make things build cleanly. A compromise? > That's due to lack of the required support from bfd/elf64-bpf.c to > load bpf object files into BFD. I think you'll find a similar result > for the other targets your patch touches, and not just with objdump > but with everything else that uses libbfd. > > There is also a minor problem with the patch in that it adds entries > to TARGET32_LIBOPCODES_CFILES without removing the corresponding > entries from TARGET64_LIBOPCODES_CFILES. Similarly for the defines in > opcodes/disassemble.c. > Maybe some targets shouldn't be accepted as part of a 32-bit --enable-targets=all for GDB/sim. Removing those "problematic" targets from the list might be another possible approach I suppose.