This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, SH] Do not treat plain binary as sh3.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]