[RFC] RE: bfd/cpu-powerpc.c, bfd/cpu-h8300.c problems (bfd_lookup _arch)
Andrew Cagney
ac131313@cygnus.com
Mon Jun 3 11:43:00 GMT 2002
More information about the Binutils mailing list
Mon Jun 3 11:43:00 GMT 2002
- Previous message (by thread): [PATCH] nm.c elf size support
- Next message (by thread): [patch] current: MIPS/ELF: Use backend's data to check for a 64-bit ABI
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> Hi all,
>
> I bump with same problem on h8300 arches, and for solving this problem
> one and for all, I see next 2 ways:
Hmm, yes, two occurances of the same problem definitly suggests the
current technique isn't maintainable.
> 1) export from archures.c something like
>
> const bfd_arch_info_type *bfd_get_lookup_arch_head
> (enum bfd_architecture arch);
>
> This is not so good, because it assume hacking bfd internals.
>
> 2) Or, put gdbarch_printables_names to bfd like:
>
> const char **bfd_machine_printables_names (enum bfd_architecture arch);
There is bfd_arch_list(). A per-architecture one would do what GDB
needs. See gdbarch.c:gdbarch_printable_names().
> which return all machine names for given architecture.
>
> What do you think?
--
I should note that GDB pulls another swifty.
It runs config.bfd so that it can identify the default bfd vector
(${targ_defvec}) (for the byte-order) and default bfd architecture
(${targ_archs}) (for the default architecture). Perhaps there should be
interfaces for these as well.
Andrew
- Previous message (by thread): [PATCH] nm.c elf size support
- Next message (by thread): [patch] current: MIPS/ELF: Use backend's data to check for a 64-bit ABI
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list