aboutsummaryrefslogtreecommitdiff
path: root/bfd/libbfd.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-09-22 22:06:51 +0000
committerIan Lance Taylor <ian@airs.com>1995-09-22 22:06:51 +0000
commit2ffbb79ae4a6a32d70a5a4228259996f76bfc46d (patch)
treeffb62b0d3f954836856ed51fae135c36bb987428 /bfd/libbfd.h
parent8f4670da40ac584bc2b35cce734839d273211095 (diff)
downloadfsf-binutils-gdb-2ffbb79ae4a6a32d70a5a4228259996f76bfc46d.zip
fsf-binutils-gdb-2ffbb79ae4a6a32d70a5a4228259996f76bfc46d.tar.gz
fsf-binutils-gdb-2ffbb79ae4a6a32d70a5a4228259996f76bfc46d.tar.bz2
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.
Diffstat (limited to 'bfd/libbfd.h')
-rw-r--r--bfd/libbfd.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 1850bf8..2aaeb8a 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -663,25 +663,19 @@ bfd_generic_get_relocated_section_contents PARAMS ((bfd *abfd,
boolean relocateable,
asymbol **symbols));
-extern bfd_arch_info_type bfd_default_arch_struct;
+extern const bfd_arch_info_type bfd_default_arch_struct;
boolean
bfd_default_set_arch_mach PARAMS ((bfd *abfd,
enum bfd_architecture arch,
unsigned long mach));
-void
-bfd_arch_init PARAMS ((void));
-
-void
-bfd_arch_linkin PARAMS ((bfd_arch_info_type *ptr));
-
-CONST bfd_arch_info_type *
+const bfd_arch_info_type *
bfd_default_compatible
- PARAMS ((CONST bfd_arch_info_type *a,
- CONST bfd_arch_info_type *b));
+ PARAMS ((const bfd_arch_info_type *a,
+ const bfd_arch_info_type *b));
boolean
-bfd_default_scan PARAMS ((CONST struct bfd_arch_info *info, CONST char *string));
+bfd_default_scan PARAMS ((const struct bfd_arch_info *info, const char *string));
struct elf_internal_shdr *
bfd_elf_find_section PARAMS ((bfd *abfd, char *name));