diff options
author | Mark Mitchell <mark@codesourcery.com> | 2003-06-06 23:33:00 +0000 |
---|---|---|
committer | Mark Mitchell <mark@codesourcery.com> | 2003-06-06 23:33:00 +0000 |
commit | 1b556c4c3bc27c8326d055453ced5b931319a272 (patch) | |
tree | 03391592152e534b23fa34ddfc99463c933d5ffe /gdb/objfiles.c | |
parent | 54b38ab9d018f850037e5192ac34841dab6fabac (diff) | |
download | gdb-1b556c4c3bc27c8326d055453ced5b931319a272.tar.gz |
* 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.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r-- | gdb/objfiles.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c index e695ebef78f..9b080013dff 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -613,7 +613,8 @@ void objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets) { struct section_offsets *delta = - (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS); + ((struct section_offsets *) + alloca (SIZEOF_N_SECTION_OFFSETS (objfile->num_sections))); { int i; |