aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1994-01-04 21:37:25 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1994-01-04 21:37:25 +0000
commite14316e7fe96be0212669a9a4d60608707f66c90 (patch)
treeacb64543e261a457cc4866899e3e1de7dca23457 /gdb
parent9b70610b4e3592f882ea0fd5626fd1b8da6898c8 (diff)
downloadgdb-e14316e7fe96be0212669a9a4d60608707f66c90.zip
gdb-e14316e7fe96be0212669a9a4d60608707f66c90.tar.gz
gdb-e14316e7fe96be0212669a9a4d60608707f66c90.tar.bz2
* objfiles.c (build_objfile_section_table): Don't abort() if
objfile->sections is already set. * objfiles.c (add_to_objfile_sections): Check SEC_ALLOC not SEC_LOAD to match recent change to exec.c.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/objfiles.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 12a3c47..4358f65 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -77,8 +77,7 @@ add_to_objfile_sections (abfd, asect, objfile_p_char)
flagword aflag;
aflag = bfd_get_section_flags (abfd, asect);
- /* FIXME, we need to handle BSS segment here...it alloc's but doesn't load */
- if (!(aflag & SEC_LOAD))
+ if (!(aflag & SEC_ALLOC))
return;
if (0 == bfd_section_size (abfd, asect))
return;
@@ -99,8 +98,11 @@ int
build_objfile_section_table (objfile)
struct objfile *objfile;
{
- if (objfile->sections)
- abort();
+ /* objfile->sections can be already set when reading a mapped symbol
+ file. I believe that we do need to rebuild the section table in
+ this case (we rebuild other things derived from the bfd), but we
+ can't free the old one (it's in the psymbol_obstack). So we just
+ waste some memory. */
objfile->sections_end = 0;
bfd_map_over_sections (objfile->obfd, add_to_objfile_sections, (char *)objfile);