[PATCH v2 1/2] H8: Set H8/300H as the default architecture for the H8 family
Alan Modra
amodra@gmail.com
Fri Jul 10 23:20:10 GMT 2026
On Fri, Jul 10, 2026 at 04:54:40PM +0200, Jan Dubiec wrote:
> diff --git a/bfd/cpu-h8300.c b/bfd/cpu-h8300.c
> index f2294ad217e..4447417610f 100644
> --- a/bfd/cpu-h8300.c
> +++ b/bfd/cpu-h8300.c
> @@ -134,10 +134,10 @@ static const bfd_arch_info_type h8300s_info_struct =
> N (32, 32, bfd_mach_h8300s, "h8300s", "h8300s", false, & h8300hn_info_struct);
>
> static const bfd_arch_info_type h8300h_info_struct =
> - N (32, 32, bfd_mach_h8300h, "h8300h", "h8300h", false, &h8300s_info_struct);
> + N (32, 32, bfd_mach_h8300h, "h8300h", "h8300h", true, &h8300s_info_struct);
>
> const bfd_arch_info_type bfd_h8300_arch =
> - N (16, 16, bfd_mach_h8300, "h8300", "h8300", true, &h8300h_info_struct);
> + N (16, 16, bfd_mach_h8300, "h8300", "h8300", false, &h8300h_info_struct);
>
> /* Pad the given address to 32 bits, converting 16-bit and 24-bit
> addresses into the values they would have had on a h8s target. */
A bfd_arch_info_type comment says:
/* TRUE if this is the default machine for the architecture.
The default arch should be the first entry for an arch so that
all the entries for that arch can be accessed via <<next>>. */
bool the_default;
According to that, when changing the default you should also rearrange
the "next" pointers.
--
Alan Modra
More information about the Binutils
mailing list