summaryrefslogtreecommitdiff
path: root/gdb/coffread.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2000-08-07 15:16:15 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2000-08-07 15:16:15 +0000
commit90de6394c32139cb88650b15d0570d54e1246e96 (patch)
treeca4954ec8dd44a04e7ffe35e723cd7d1aa64f558 /gdb/coffread.c
parent62504dc330152a23dd4a49e063faea3605008c28 (diff)
downloadgdb-90de6394c32139cb88650b15d0570d54e1246e96.tar.gz
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.
Diffstat (limited to 'gdb/coffread.c')
-rw-r--r--gdb/coffread.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 75f6fc5011e..f35609d0a8a 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -347,7 +347,8 @@ cs_to_section (struct coff_symbol *cs, struct objfile *objfile)
else if (bfd_get_section_flags (abfd, sect) & SEC_LOAD)
off = SECT_OFF_DATA (objfile);
else
- off = SECT_OFF_BSS (objfile);
+ /* Just return the bfd section index. */
+ off = sect->index;
}
return off;
}