diff options
Diffstat (limited to 'bfd/cisco-core.c')
-rw-r--r-- | bfd/cisco-core.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/bfd/cisco-core.c b/bfd/cisco-core.c index b7f735b59de..7d63118aef6 100644 --- a/bfd/cisco-core.c +++ b/bfd/cisco-core.c @@ -1,5 +1,5 @@ /* BFD back-end for CISCO crash dumps. - Copyright 1994, 1997, 1999, 2000, 2001, 2002, 2004 + Copyright 1994, 1997, 1999, 2000, 2001, 2002, 2004, 2006 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -95,6 +95,7 @@ cisco_core_file_validate (abfd, crash_info_loc) sec_ptr asect; struct stat statbuf; bfd_size_type amt; + flagword flags; if (bfd_seek (abfd, (file_ptr) crash_info_loc, SEEK_SET) != 0) return NULL; @@ -241,10 +242,10 @@ cisco_core_file_validate (abfd, crash_info_loc) /* Create a ".data" section that maps the entire file, which is essentially a dump of the target system's RAM. */ - asect = bfd_make_section_anyway (abfd, ".data"); + flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS; + asect = bfd_make_section_anyway_with_flags (abfd, ".data", flags); if (asect == NULL) goto error_return; - asect->flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS; /* The size of memory is the size of the core file itself. */ asect->size = statbuf.st_size; asect->vma = rambase; @@ -253,10 +254,10 @@ cisco_core_file_validate (abfd, crash_info_loc) /* Create a ".crash" section to allow access to the saved crash information. */ - asect = bfd_make_section_anyway (abfd, ".crash"); + flags = SEC_HAS_CONTENTS; + asect = bfd_make_section_anyway_with_flags (abfd, ".crash", flags); if (asect == NULL) goto error_return; - asect->flags = SEC_HAS_CONTENTS; asect->vma = 0; asect->filepos = crashinfo_offset; asect->size = sizeof (crashinfo); @@ -264,10 +265,9 @@ cisco_core_file_validate (abfd, crash_info_loc) /* Create a ".reg" section to allow access to the saved registers. */ - asect = bfd_make_section_anyway (abfd, ".reg"); + asect = bfd_make_section_anyway_with_flags (abfd, ".reg", flags); if (asect == NULL) goto error_return; - asect->flags = SEC_HAS_CONTENTS; asect->vma = 0; asect->filepos = bfd_get_32 (abfd, crashinfo.registers) - rambase; /* Since we don't know the exact size of the saved register info, |