This is the mail archive of the binutils@sources.redhat.com 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: H8 targets.


 >> The only problem with changing things now is that you'll 
> make the GNU
>  >> tools incompatible with previous releases of the GNU tools.  
>  >> Then again,
>  >> it's probably still the right thing to do, but it'll need to 
>  >> be clearly
>  >> documented in the release notes for the binutils release 
>  >> where the change
>  >> becomes effective.
>  >> 
>  >> I've got these changes sitting in my local tree -- I haven't 
>  >> looked at them
>  >> in any detail in nearly a year, but they may be useful to 
>  >> anyone trying to
>  >> fix this little problem.
>  >> 
>  >
>  >Without this patch the third party debuggers (e.g. HDI) 
>  >may fail to recognize the binary generated by h8300-elf-gcc.
>  >The patch is running fine for me. After applying the same
>  >patch to gdb, the h8300-elf-run also executes the binaries
>  >gracefully.
> Yes, but with the patch the GNU tools won't be able to 
> interoperate with
> objects built by earlier releases of the tools.
> 
> I wonder if we could actually use both schemes and keep compatibility
> with both 3rd party tools as well as earlier versions of the 
> GNU tools.
> 
> 
> First we look at the ELF_MACHINE bits.  If it's EM_H8_300H or 
> EM_H8S, then
> we're done.  If the machien id is EM_H8_300, then we peek at 
> the flags bits.
> If the flag bugs are set, then we use them to set the machine 
> type, if the
> flag bits are not set, then we're plain H8/300.
> 
The H8300 third party tool chain (supplied with HEW) 
make use of value 0x0, 0x1, 0x2, 0x3 and 0x4 of e_flag 
field for address space width = default(=16), 20 , 24,
28 and 32 respectively. Since there is no conflict
with the e_flag values used by binutils for H8300 targets,
the tools may continue to support old combination
of e_machine and e_flag also. However the latest 
binutils  may generate the elf binary with the 
e_machine and e_flag value that is compatible
with HEW tool chain only.

Since GCC support byte addressing only hence in case 
of H8S and H8300H targets the value of e_flags may be 
set to 0x4 and for H8300 target value 0x0 may be 
retained as e_flags.

Please let me know your opinion about this.

Thanks and Regards,
Nitin.


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