This is the mail archive of the
mailing list for the binutils project.
Re: H8 targets.
> The elf.h contains the follwoing different e_machine value for
> different H8 architectures:
You mean include/elf/common.h, but anyway...
> Then why is it that H8300-elf uses e_machine = EM_H8_300
> for all <default> , -ms , -mh targets? To differentiate between
> targets, it uses Processor specific flags (e_flags) instead.
There is no comment in the code to explain this discrepancy. It may
be that these numbers were allocated after the code in the BFD library
was written, and so they were not known to the author. Or it may be
that the ABI for the h8300x series specifies that the e_flags field
should be used. Or it may well be a bug in the h8300 code in the BFD
I suspect however that the reason is that in order to able to support
producing h8300, h8300s and h8300h binaries from the just one toolchain
(instead of three separate ones) the author chose to select a single
machine number and then use the flags to distinguish the different
processor varieties. (This is the standard behavior for other ELF
> Due to these the utilities like "file" does not identify the
> architecture correctly. Though h8300-elf-readelf does it.
Is this a serious problem ?