From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by sourceware.org (Postfix) with ESMTPS id 52BB73857355 for ; Tue, 26 Apr 2022 13:22:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 52BB73857355 Received: by mail-pf1-x435.google.com with SMTP id a15so17940892pfv.11 for ; Tue, 26 Apr 2022 06:22:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=6J6GrRkJyRbRNpGCCgQVsEcOABRB4+GoNS5/jBnd/Wc=; b=WctyOsrLrEjAclDIQ6L0dfvVgOeYTjvTHdPvOCDeairNGXohKjUGS5cF0HB2oisBRL DFVKrxD1ubZKGbDf9TLHtOSfSguAXrgp28+6k5oyoYX/1dOf289mkurwaIiizcqi1SFF llHVrAwZhNEBT2b40ATlwfiL+lleq6E3gsDpX/VPlYgVWTLRFEbY/RiEwYf4KIVUuVS9 1hHyyp4eESAow88UUY0F035nD0D/O70hQKguIGyRUgEDI71fS5mAqUTVHq88+/oW4A6+ aN6iYKvvpwt5iJKtPB7n9W5z+pWixI5UcWCm82DwI4W9uMhAzqUCwClQVBVpZCyTFYtU 7Fxg== X-Gm-Message-State: AOAM533AB3P2UWBECDezvkTotLwm3JYXnV7hPpjCeqpLPQocefQRX90J UWbY9I5h4gEVe9UoCp4wNcw= X-Google-Smtp-Source: ABdhPJwi+kIxWw9YfXflK4AmGHjFcM/myxNsolDDZzkYCiatsvAAwNAbYBYITvNNhxMTUjKNXn2uEg== X-Received: by 2002:a05:6a00:1411:b0:4fd:e594:fac0 with SMTP id l17-20020a056a00141100b004fde594fac0mr24598962pfu.79.1650979364334; Tue, 26 Apr 2022 06:22:44 -0700 (PDT) Received: from squeak.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id r31-20020a63205f000000b0039db0514016sm12920564pgm.29.2022.04.26.06.22.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 06:22:43 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 27EEB1142F40; Tue, 26 Apr 2022 22:52:40 +0930 (ACST) Date: Tue, 26 Apr 2022 22:52:40 +0930 From: Alan Modra To: "Jose E. Marchesi" Cc: Luis Machado , Joel Brobecker , binutils@sourceware.org, vapier@gentoo.org Subject: Re: [PATCH, v2] Fix 32-bit build for --enable-targets=all Message-ID: References: <20220422132513.22471-1-luis.machado@arm.com> <2b02c5bd-1db2-f322-79c9-e6878adf8b67@arm.com> <87v8uwi7xi.fsf@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87v8uwi7xi.fsf@oracle.com> X-Spam-Status: No, score=-3031.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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 13:22:47 -0000 On Tue, Apr 26, 2022 at 10:07:53AM +0200, Jose E. Marchesi wrote: > > Hi Alan. > > > 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 > > > > That's due to lack of the required support from bfd/elf64-bpf.c to > > load bpf object files into BFD. > > Could you please elaborate on that? > > What is it in elf64-bpf.c that must be improved in order to support > 32-bit --enable-targets=all binutils? It isn't that elf64-bpf.c is missing something, it's that the entire file is not built on a 32-bit host with --enable-targets=all and without --enable-64-bit-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. -- Alan Modra Australia Development Lab, IBM