2000-08-07 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* objfiles.h (SECT_OFF_BSS): Don't detect invalid sect_index_bss here, let the users of the macro do it. * symtab.h (ANOFFSET): Detect here if the section index is not initialized. * xcoffread.c (find_targ_sec): Don't treat .bss as special, because some objfiles may not have that section at all. * coffread.c (cs_to_section): Ditto. * elfread.c (elf_symtab_read): Detect an uninitialized index value. (elfstab_offset_sections): The macro ANOFFSET cannot be used as an lvalue anymore. * remote.c (get_offsets, remote_cisco_objfile_relocate): Don't use ANOFFSET as an lvalue. * objfiles.c (objfile_relocate, objfile_relocate): Don't use ANOFFSET as an lvalue. * symfile.c (default_symfile_offsets): Don't use ANOFFSET as an lvalue.
This commit is contained in:
parent
279ddab43f
commit
a4c8257b03
8 changed files with 52 additions and 20 deletions
|
@ -520,7 +520,7 @@ objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
|
|||
int something_changed = 0;
|
||||
for (i = 0; i < objfile->num_sections; ++i)
|
||||
{
|
||||
ANOFFSET (delta, i) =
|
||||
delta->offsets[i] =
|
||||
ANOFFSET (new_offsets, i) - ANOFFSET (objfile->section_offsets, i);
|
||||
if (ANOFFSET (delta, i) != 0)
|
||||
something_changed = 1;
|
||||
|
@ -639,7 +639,7 @@ objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
|
|||
{
|
||||
int i;
|
||||
for (i = 0; i < objfile->num_sections; ++i)
|
||||
ANOFFSET (objfile->section_offsets, i) = ANOFFSET (new_offsets, i);
|
||||
(objfile->section_offsets)->offsets[i] = ANOFFSET (new_offsets, i);
|
||||
}
|
||||
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue