mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-28 18:10:46 +00:00
Change arch info to be const, initialized at compile time.
* archures.c: Reindent many functions. Change CONST to const. (bfd_arch_info_type): Make arch_name const. Remove disassemble; nothing set it anyhow. Make next const. (bfd_arch_info_list): Remove. (bfd_archures_list): Rename from archures_init_table. Change from a table of function pointers to a table of bfd_arch_info_type structure addresses. (bfd_scan_arch): Rewrite accordingly. Return a const pointer. (bfd_lookup_arch): Likewise. (bfd_set_arch_info): Rewrite accordingly. Change argument to be a const pointer. (bfd_default_arch_struct): Make const. (bfd_arch_init, bfd_arch_linkin): Remove. (bfd_get_arch_info): Return a const pointer. * init.c (bfd_init): Don't call bfd_arch_init. * bfd.c (struct _bfd): Make arch_info const. * bfd-in2.h: Rebuild. * libbfd.h: Rebuild. * configure.in: Put & before everything in $selarchs. * configure: Rebuild. * cpu-*.c: Change bfd_*_arch from a function which calls bfd_arch_linkin to a const structure. * ieee.c (ieee_object_p): Make arch const.
This commit is contained in:
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
#include "sysdep.h"
|
||||
#include "libbfd.h"
|
||||
|
||||
static bfd_arch_info_type arch_info_struct =
|
||||
const bfd_arch_info_type bfd_a29k_arch =
|
||||
{
|
||||
32, /* 32 bits in a word */
|
||||
32, /* 32 bits in an address */
|
||||
@@ -37,9 +37,3 @@ static bfd_arch_info_type arch_info_struct =
|
||||
bfd_default_scan ,
|
||||
0,
|
||||
};
|
||||
|
||||
void
|
||||
bfd_a29k_arch ()
|
||||
{
|
||||
bfd_arch_linkin(&arch_info_struct);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user