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]

[SH-ELF] : Mismatch in 'e_flags' value in elf header for Renesas SHC and GNUSH objects


Hi,

We are working on interoperability between Renesas SHC and GNUSH
toolchain.

The 'e_flags' field in a GNUSH and SHC object file elf header have
different 
values. 

Please refer to the following link for the value of 'e_flags' for SH
targets in 
GNUSH,
http://sourceware.org/cgi-bin/cvsweb.cgi/src/include/elf/sh.h?annotate=1
.21&cvsroot=src

The values for 'e_flags' in Renesas SHC toolchain are,

0 - neither fpu nor dsp,  
1 - fpu,  
2 - dsp,
4 - SH-2A, 
5 - SH-2A(FPU)

Is it possible to have same values for 'e_flags' in GNUSH as in Renesas
SHC 
toolchain (or maybe only on using '-mrenesas' option) ? This will ensure
better 
interoperability between Renesas SHC and GNUSH with '-mrenesas' option.

For example, 
We get the following architecture related linker error while linking
SH2A 
Renesas objects with GNUSH linker,
"uses dsp instructions while previous modules use floating point
instructions" 
"uses instructions which are incompatible with instructions used in
previous 
modules"    
"failed to merge target specific data of file SHC_sh2a.rel"   

This error occurs because the values assigned by SHC toolchain to
'e_flags' 
correspond to 'dsp' targets in GNUSH toolchain.

Target		SHC
SH2A (No FPU)	0x4 -----------> corresponds to sh-dsp target in GNUSH
SH2A-FPU	0x5 -----------> corresponds to sh3-dsp target in GNUSH

On changing the value of the 'e_flags' field in Renesas objects to that
expected
by GNUSH, the linking is successful.

Please let us know your comments on matching the values of 'e_flags' in
GNUSH 
with those in Renesas SHC.

Regards,
Gina Verlekar
KPIT Cummins Infosystems Ltd.
Pune, India

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Free download of GNU based tool-chains for Renesas' SH, H8, R8C, M16C
and M32C Series. The following site also offers free technical support
to its users. Visit http://www.kpitgnutools.com for details. 
Latest versions of KPIT GNU tools were released on February 6, 2007.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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