Default architecture according --target=...configury?

Ian Lance Taylor
Wed Aug 18 10:29:00 GMT 1999

   Date: Wed, 18 Aug 1999 19:05:43 +1000
   From: Andrew Cagney <>

   Is it possible to reliably determine the default architecture (struct
   bfd_arch_info) as selected by the configuration option --target=....
   (even when --enable-targets was specified)?

Well, speaking precisely, there is no default architecture.  There is
a default BFD target, and if an object file is recognized using that
format running bfd_check_format will set the architecture
appropriately.  For example, if the default BFD target is
elf32-bigmips, BFD can recognize a file using any of the 16
architectures listed in bfd/cpu-mips.c.

So it really depends upon what you mean by the default architecture.
For example, if you configure gas for mips4111-elf, then gas will by
default generate object files which use the mips4111 architecture.

   PS: Why?  I'd like GDB to make a better guess at a default
   architecture.  bfd_default_arch_struct just isn't very interesting.

If you explain further what you mean by this, perhaps we can think of
some way to make it work for you.  When does gdb want to know the
default architecture?  What is it going to do with the information?


More information about the Gdb mailing list