aboutsummaryrefslogtreecommitdiff
path: root/gdb/somread.c
diff options
context:
space:
mode:
authorMark Alexander <marka@cygnus>1996-07-03 05:11:40 +0000
committerMark Alexander <marka@cygnus>1996-07-03 05:11:40 +0000
commite74acce48c1b4efc29fd1e9e84639b77383aa002 (patch)
tree11d2d6bd0a7cdc15c36480e244625e817eb65e1b /gdb/somread.c
parent7647e0dd79067a650898281d3cffc4746aa09fae (diff)
downloadgdb-e74acce48c1b4efc29fd1e9e84639b77383aa002.zip
gdb-e74acce48c1b4efc29fd1e9e84639b77383aa002.tar.gz
gdb-e74acce48c1b4efc29fd1e9e84639b77383aa002.tar.bz2
* coffread.c, dbxread.c, elfread.c, mipsread.c, nlmread.c,
os9kread.c: Replace identical sym_offsets functions with default_symfile_offsets. * somread.c (som_symfile_offsets): Use new SIZEOF_SECTION_OFFSETS macro to allocate section_offsets. * symfile.c (default_symfile_offsets): New function. * symfile.h: Declare default_symfile_offsets. * symtab.h: Define SIZEOF_SECTION_OFFSETS macro to simplify allocation of section_offsets.
Diffstat (limited to 'gdb/somread.c')
-rw-r--r--gdb/somread.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gdb/somread.c b/gdb/somread.c
index ab8d531..4951f10 100644
--- a/gdb/somread.c
+++ b/gdb/somread.c
@@ -435,9 +435,7 @@ som_symfile_offsets (objfile, addr)
objfile->num_sections = SECT_OFF_MAX;
section_offsets = (struct section_offsets *)
- obstack_alloc (&objfile -> psymbol_obstack,
- sizeof (struct section_offsets)
- + sizeof (section_offsets->offsets) * (SECT_OFF_MAX-1));
+ obstack_alloc (&objfile -> psymbol_obstack, SIZEOF_SECTION_OFFSETS);
/* First see if we're a shared library. If so, get the section
offsets from the library, else get them from addr. */