This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH/RFA] Ambiguity problem of REL objects on ELF sh*-*-*
On Sat, Nov 02, 2002 at 11:26:33PM +0900, kaz Kojima wrote:
> Alan Modra <amodra@bigpond.net.au> wrote:
> > No, this is the wrong place to match associated targets. Depending
> > on the order of target vectors, you may hit one of the associated
> > targets before the default target. Try this:
> >
> > * format.c (bfd_check_format_matches): Store bfd_target pointers
> > in matching_vector instead of target names. Select first target
> > from bfd_associated_vector that matches a list of ambiguous targets.
>
> You are right. My patch was too sensitive the order of targets.
>
> BTW, now I get 2 errors on gas testsuite for sh64-unknown-linux-gnu
> target configured with --enable-targets=all. objdump -x reports that
> the start address of the REL object is -1 in these two cases.
> It seems that vms_object_p calls vms_initialize unconditionally and
> vms_initialize set the start address to -1:
>
I don't see why we should spend any times on it. SH is broken since
it uses the same EI_OSABI value for different ABIs. I have suggested
how it should be fixed. In the mean time, please try this. We have
so many "#if 0"s in targets.c because the underline binary formats
don't support different ABIs. But there is no excuse for ELF. Also
Linux/sh64 vectors are missing for --enable-targets=all.
H.J.
----
2002-11-02 H.J. Lu <hjl@gnu.org>
* targets.c (_bfd_target_vector): Comment out all sh64 vectors
and add Linux/sh64 vectors for --enable-targets=all.
--- bfd/targets.c.sh Tue Oct 22 21:05:19 2002
+++ bfd/targets.c Sat Nov 2 09:52:38 2002
@@ -855,11 +855,17 @@ static const bfd_target * const _bfd_tar
&bfd_elf32_shnbsd_vec,
&bfd_elf32_shqnx_vec,
#ifdef BFD64
+#if 0
+ /* We have no way of distinguishing these from other sh64
+ variants */
&bfd_elf32_sh64_vec,
&bfd_elf32_sh64l_vec,
&bfd_elf32_sh64lnbsd_vec,
&bfd_elf32_sh64nbsd_vec,
#endif
+ &bfd_elf32_sh64lin_vec,
+ &bfd_elf32_sh64blin_vec,
+#endif
&bfd_elf32_sparc_vec,
&bfd_elf32_tradbigmips_vec,
&bfd_elf32_tradlittlemips_vec,
@@ -885,10 +891,16 @@ static const bfd_target * const _bfd_tar
&bfd_elf64_powerpc_vec,
&bfd_elf64_powerpcle_vec,
&bfd_elf64_s390_vec,
+#if 0
+ /* We have no way of distinguishing these from other sh64
+ variants */
&bfd_elf64_sh64_vec,
&bfd_elf64_sh64l_vec,
&bfd_elf64_sh64lnbsd_vec,
&bfd_elf64_sh64nbsd_vec,
+#endif
+ &bfd_elf64_sh64lin_vec,
+ &bfd_elf64_sh64blin_vec,
#if 0
&bfd_elf64_sparc_vec,
#endif