This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH, SH] Do not treat plain binary as sh3.
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: yoshii dot takashi at renesas dot com
- Cc: binutils at sourceware dot org, lethal at linux-sh dot org
- Date: Fri, 06 Jun 2008 18:13:44 +0900 (JST)
- Subject: Re: [PATCH, SH] Do not treat plain binary as sh3.
- References: <4848E3A3.7080703@renesas.com>
Hi Yoshii-san,
Takashi Yoshii <yoshii.takashi@renesas.com> wrote:
> diff -ur binutils-2.18.50.0.6.org/include/elf/sh.h
> binutils-2.18.50.0.6/include/elf/sh.h
> --- binutils-2.18.50.0.6.org/include/elf/sh.h 2005-05-11
> 07:46:52.000000000 +0900
> +++ binutils-2.18.50.0.6/include/elf/sh.h 2008-05-21 14:32:26.000000000
> +0900
> @@ -54,7 +54,7 @@
> bfd_mach_* are defined in bfd_in2.h (generated from
> archures.c). */
> #define EF_SH_BFD_TABLE \
> -/* EF_SH_UNKNOWN */ bfd_mach_sh3 , \
> +/* EF_SH_UNKNOWN */ bfd_mach_sh , \
> /* EF_SH1 */ bfd_mach_sh , \
> /* EF_SH2 */ bfd_mach_sh2 , \
> /* EF_SH3 */ bfd_mach_sh3 , \
>
This change needs a tweak of ld testcase. I've got
Running /exp/ldroot/dodes/LOCAL/src/ld/testsuite/ld-sh/arch/arch.exp ...
FAIL: sh-dsp file with sh-unknown file should link to arch sh3-dsp
FAIL: sh file with sh-unknown file should link to arch sh3
FAIL: sh2 file with sh-unknown file should link to arch sh3
FAIL: sh2a-nofpu-or-sh3-nommu file with sh-unknown file should link to arch sh3
FAIL: sh2a-nofpu-or-sh4-nommu-nofpu file with sh-unknown file should link to arch sh4-nofpu
FAIL: sh2a-nofpu file should NOT link with sh-unknown file
FAIL: sh2a-or-sh3e file with sh-unknown file should link to arch sh3e
FAIL: sh2a-or-sh4 file with sh-unknown file should link to arch sh4
FAIL: sh2a file should NOT link with sh-unknown file
FAIL: sh2e file with sh-unknown file should link to arch sh3e
FAIL: sh3-nommu file with sh-unknown file should link to arch sh3
FAIL: sh4-nommu-nofpu file with sh-unknown file should link to arch sh4-nofpu
FAIL: sh-unknown file with sh-dsp file should link to arch sh3-dsp
FAIL: sh-unknown file with sh file should link to arch sh3
FAIL: sh-unknown file with sh2 file should link to arch sh3
FAIL: sh-unknown file with sh2a-nofpu-or-sh3-nommu file should link to arch sh3
FAIL: sh-unknown file with sh2a-nofpu-or-sh4-nommu-nofpu file should link to arch sh4-nofpu
FAIL: sh-unknown file should NOT link with sh2a-nofpu file
FAIL: sh-unknown file with sh2a-or-sh3e file should link to arch sh3e
FAIL: sh-unknown file with sh2a-or-sh4 file should link to arch sh4
FAIL: sh-unknown file should NOT link with sh2a file
FAIL: sh-unknown file with sh2e file should link to arch sh3e
FAIL: sh-unknown file with sh3-nommu file should link to arch sh3
FAIL: sh-unknown file with sh4-nommu-nofpu file should link to arch sh4-nofpu
FAIL: sh-unknown file with sh-unknown file should link to arch sh3
when running "make check" on ld. Please see the top of
ld/testsuite/ld-sh/arch/arch_expected.txt.
I agree with you that it's for the backward compatibility and
it'd be better to change as the proposed patch. It's possible
for someone to depend this behavior, but it doesn't seem a good
way. If no one objects it in 48 hours, I'll approve this patch
and the expected regeneration of arch_expected.txt.
A minor nit: the patch should be against the current mainline
with the corresponding ChangeLog entry.
Regards,
kaz