public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: "Jose E. Marchesi" <jose.marchesi@oracle.com>
Cc: Luis Machado <luis.machado@arm.com>,
	Joel Brobecker <brobecker@adacore.com>,
	binutils@sourceware.org, vapier@gentoo.org
Subject: Re: [PATCH, v2] Fix 32-bit build for --enable-targets=all
Date: Tue, 26 Apr 2022 22:52:40 +0930	[thread overview]
Message-ID: <YmfyIPm2q2bPt88e@squeak.grove.modra.org> (raw)
In-Reply-To: <87v8uwi7xi.fsf@oracle.com>

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

  reply	other threads:[~2022-04-26 13:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22 13:25 Luis Machado
2022-04-24 14:58 ` Joel Brobecker
2022-04-25  7:40   ` Luis Machado
2022-04-26  2:52     ` Alan Modra
2022-04-26  6:31       ` Luis Machado
2022-04-26 11:43         ` Alan Modra
2022-04-27  9:57         ` Pedro Alves
2022-04-27 11:25           ` Luis Machado
2022-04-26  8:07       ` Jose E. Marchesi
2022-04-26 13:22         ` Alan Modra [this message]
2022-04-29 12:35           ` Luis Machado
2022-04-29 16:22             ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YmfyIPm2q2bPt88e@squeak.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=brobecker@adacore.com \
    --cc=jose.marchesi@oracle.com \
    --cc=luis.machado@arm.com \
    --cc=vapier@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).