From: "H. J. Lu" <hjl@lucon.org>
To: Richard Sandiford <rsandifo@redhat.com>
Cc: "Steven J. Hill" <sjhill@realitydiluted.com>,
linux-mips@linux-mips.org, binutils@sources.redhat.com
Subject: Re: Problems generating shared library for MIPS using binutils-2.13...
Date: Tue, 5 Nov 2002 09:15:00 -0800 [thread overview]
Message-ID: <20021105091500.A2743@lucon.org> (raw)
In-Reply-To: <wvnvg3ct57b.fsf@talisman.cambridge.redhat.com>; from rsandifo@redhat.com on Tue, Nov 05, 2002 at 03:19:04PM +0000
On Tue, Nov 05, 2002 at 03:19:04PM +0000, Richard Sandiford wrote:
> "Steven J. Hill" <sjhill@realitydiluted.com> writes:
> > In the '_bfd_mips_elf_final_write_processing' function in 'bfd/elfxx-mips.c'
> > If I print out the EF_MIPS_ARCH flags for the input BFD descriptor. It
> > is properly set to 'MIPS2', but when the case statement in
> > '_bfd_mips_elf_final_write_processing' is traversed, it
> > uses the R3000/default case which means that the target CPU architecture
> > didn't get put into the BFD descriptor.
>
> Is it related to this?
>
> <http://sources.redhat.com/ml/binutils/2002-10/msg00248.html>
>
> (In the message body, I accidentally copied the code after
> the patch rather than before. Sorry about that.)
>
> Anyway, that patch won't solve your problem, but the issue
> seems to be the same: _bfd_mips_elf_merge_private_bfd_data()
> merges the EF_MIPS_ARCH and EF_MIPS_MACH bits, but
> _bfd_mips_elf_final_write_processing() overwrites them
> based on the BFD mach.
>
> Personally, I think _bfd_mips_elf_final_write_processing()
> is doing the right thing. Surely we ought to be able to
> set EF_MIPS_ARCH and EF_MIPS_MACH based on the value of
> bfd_get_mach?
>
> I wonder whether _bfd_mips_elf_merge_private_bfd_data() should
> be checking for compatibility based on the BFD machs rather
> than the header flags. It seems a bit odd that we check the
> ISA level and "machine" separately.
>
> In other words, replace:
>
> /* Compare the ISA's. */
> if ((new_flags & (EF_MIPS_ARCH | EF_MIPS_MACH))
> != (old_flags & (EF_MIPS_ARCH | EF_MIPS_MACH)))
> {
> ...
> }
>
> with code that checks bfd_get_mach (ibfd) against bfd_get_mach (obfd).
> If ibfd's architecture is an extension of obfd's, copy it to obfd.
The FSF binutils has never been right. I have fixed it in my Linux
binutils. See my followups on this thread.
H.J.
next prev parent reply other threads:[~2002-11-05 17:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-25 16:38 Problems generating shared library for MIPS using binutils-2.13 Steven J. Hill
2002-10-25 16:44 ` Daniel Jacobowitz
2002-10-25 16:54 ` Steven J. Hill
2002-10-25 17:06 ` Maciej W. Rozycki
2002-11-04 14:49 ` Steven J. Hill
2002-11-04 15:02 ` H. J. Lu
2002-11-04 16:57 ` Steven J. Hill
2002-11-04 17:11 ` H. J. Lu
2002-11-04 17:16 ` Steven J. Hill
2002-11-04 17:24 ` H. J. Lu
2002-11-05 15:19 ` Richard Sandiford
2002-11-05 17:15 ` H. J. Lu [this message]
2002-11-05 17:26 ` Daniel Jacobowitz
2002-11-05 17:33 ` H. J. Lu
2002-11-05 18:17 ` Richard Sandiford
2002-11-05 18:32 ` Daniel Jacobowitz
2002-11-05 19:21 ` Eric Christopher
2002-10-25 17:50 ` H. J. Lu
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=20021105091500.A2743@lucon.org \
--to=hjl@lucon.org \
--cc=binutils@sources.redhat.com \
--cc=linux-mips@linux-mips.org \
--cc=rsandifo@redhat.com \
--cc=sjhill@realitydiluted.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.