* elfread.c (elf_symtab_read): Avoid use of SECT_OFF_MAX.
(elfstab_offset_sections): Likewise. * gdb-stabs.h (stab_section_info): Likewise. * i386-interix-tdep.c (pei_adjust_objfile_offsets): Likewise. * objfiles.c (objfile_relocate): Likewise. * pa64solib.c (pa64_solib_add_solib_objfile): Likewise. * remote.c (get_offsets): Likewise. (remote_cisco_objfile_relocate): Likewise. * somread.c (som_symfile_offsets): Likewise. * symfile.c (alloc_section_addr_info): New function. (build_section_addr_info_from_section_tab): Use it. (free_section_addr_info): Adjust. (default_symfile_offsets): Avoid use of SECT_OFF_MAX. (syms_from_objfile): Allocate local_addr dynamically. (symbol_file_add_with_addrs_or_offsets): Allocate orig_addrs dynamically. (add_symbol_file_command): Allocate sect_opts dynamically. (reread_symbols): Avoid use of SECT_OFF_MAX. * symfile.h (section_addr_info): Do not use MAX_SECTIONS. (alloc_section_addr_info): Declare it. * symtab.h (SIZEOF_SECTION_OFFSETS): Remove. * win32-nat.c (solib_symbols_add): Allocate section_addrs dynamically. * xcoffread.c (xcoff_symfile_offsets): Avoid use of SECT_OFF_MAX.
This commit is contained in:
parent
539ee71a87
commit
a39a16c41b
14 changed files with 185 additions and 79 deletions
|
@ -67,16 +67,18 @@ struct psymbol_allocation_list
|
|||
solib.c to communicate the section addresses in shared objects to
|
||||
symbol_file_add (). */
|
||||
|
||||
#define MAX_SECTIONS 64
|
||||
struct section_addr_info
|
||||
{
|
||||
/* The number of sections for which address information is
|
||||
available. */
|
||||
size_t num_sections;
|
||||
/* Sections whose names are file format dependent. */
|
||||
struct other_sections
|
||||
{
|
||||
CORE_ADDR addr;
|
||||
char *name;
|
||||
int sectindex;
|
||||
} other[MAX_SECTIONS];
|
||||
} other[1];
|
||||
};
|
||||
|
||||
/* Structure to keep track of symbol reading functions for various
|
||||
|
@ -185,6 +187,11 @@ extern void new_symfile_objfile (struct objfile *, int, int);
|
|||
extern struct objfile *symbol_file_add (char *, int,
|
||||
struct section_addr_info *, int, int);
|
||||
|
||||
/* Create a new section_addr_info, with room for NUM_SECTIONS. */
|
||||
|
||||
extern struct section_addr_info *
|
||||
alloc_section_addr_info (size_t num_sections);
|
||||
|
||||
/* Build (allocate and populate) a section_addr_info struct from
|
||||
an existing section table. */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue