mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 07:08:01 +08:00
* 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.
This commit is contained in:
@ -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. */
|
||||
|
Reference in New Issue
Block a user