aboutsummaryrefslogtreecommitdiff
path: root/gdb/elfread.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2010-09-30 19:14:30 +0000
committerTom Tromey <tromey@redhat.com>2010-09-30 19:14:30 +0000
commit00b5771c2a7b46f918bd7c8dd8ec44b79b1372b8 (patch)
treeddc93e571778fd8876c7054edaf0c4bd41042929 /gdb/elfread.c
parent38f12cfce28f77a63b324a65a30d143f92cc0af4 (diff)
downloadgdb-00b5771c2a7b46f918bd7c8dd8ec44b79b1372b8.zip
gdb-00b5771c2a7b46f918bd7c8dd8ec44b79b1372b8.tar.gz
gdb-00b5771c2a7b46f918bd7c8dd8ec44b79b1372b8.tar.bz2
* symfile.h (struct sym_fns) <next>: Remove.
(add_symtab_fns): Update. * symfile.c (sym_fns_ptr): New typedef. (symtab_fns): Now a VEC. (add_symtab_fns): Update. Change argument type. (find_sym_fns): Update. Change return type. (get_symfile_segment_data): Update. * objfiles.h (struct objfile) <sf>: Now const. * somread.c (som_sym_fns): Now const. Update. * xcoffread.c (xcoff_sym_fns): Now const. Update. * mipsread.c (ecoff_sym_fns): Now const. Update. * machoread.c (macho_sym_fns): Now const. Update. * elfread.c (elf_sym_fns): Now const. Update. (elf_sym_fns_gdb_index): Likewise. * dbxread.c (aout_sym_fns): Now const. Update. * coffread.c (coff_sym_fns): Now const. Update.
Diffstat (limited to 'gdb/elfread.c')
-rw-r--r--gdb/elfread.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gdb/elfread.c b/gdb/elfread.c
index ae92ff6..4745f8e 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -41,7 +41,7 @@
extern void _initialize_elfread (void);
/* Forward declaration. */
-static struct sym_fns elf_sym_fns_gdb_index;
+static const struct sym_fns elf_sym_fns_gdb_index;
/* The struct elfinfo is available only during ELF symbol table and
psymtab reading. It is destroyed at the completion of psymtab-reading.
@@ -1034,7 +1034,7 @@ elfstab_offset_sections (struct objfile *objfile, struct partial_symtab *pst)
/* Register that we are able to handle ELF object file formats. */
-static struct sym_fns elf_sym_fns =
+static const struct sym_fns elf_sym_fns =
{
bfd_target_elf_flavour,
elf_new_init, /* sym_new_init: init anything gbl to entire symtab */
@@ -1046,13 +1046,12 @@ static struct sym_fns elf_sym_fns =
a file. */
NULL, /* sym_read_linetable */
default_symfile_relocate, /* sym_relocate: Relocate a debug section. */
- &psym_functions,
- NULL /* next: pointer to next struct sym_fns */
+ &psym_functions
};
/* The same as elf_sym_fns, but not registered and uses the
DWARF-specific GNU index rather than psymtab. */
-static struct sym_fns elf_sym_fns_gdb_index =
+static const struct sym_fns elf_sym_fns_gdb_index =
{
bfd_target_elf_flavour,
elf_new_init, /* sym_new_init: init anything gbl to entire symab */
@@ -1064,8 +1063,7 @@ static struct sym_fns elf_sym_fns_gdb_index =
a file. */
NULL, /* sym_read_linetable */
default_symfile_relocate, /* sym_relocate: Relocate a debug section. */
- &dwarf2_gdb_index_functions,
- NULL /* next: pointer to next struct sym_fns */
+ &dwarf2_gdb_index_functions
};
void