summaryrefslogtreecommitdiff
path: root/bfd/cisco-core.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2006-06-01 03:45:58 +0000
committerAlan Modra <amodra@bigpond.net.au>2006-06-01 03:45:58 +0000
commit454a1d45bf48e21c7b0d3895bd67bd416c9f08db (patch)
treea4e0128ccca5085bc3f27e471ce5d574634a6b15 /bfd/cisco-core.c
parent2c8c74e00b6f4014ad85fe77940471169a82c84d (diff)
downloadbinutils-redhat-454a1d45bf48e21c7b0d3895bd67bd416c9f08db.tar.gz
* stabs.c (_bfd_link_section_stabs): Use bfd_make_section*_with_flags
instead of bfd_make_section*. * aix386-core.c: Likewise. * aix5ppc-core.c: Likewise. * aout-adobe.c: Likewise. * aoutf1.h: Likewise. * binary.c: Likewise. * cisco-core.c: Likewise. * coff-arm.c: Likewise. * coff-h8300.c: Likewise. * elf.c: Likewise. * elf32-bfin.c: Likewise. * elf32-m32c.c: Likewise. * hppabsd-core.c: Likewise. * hpux-core.c: Likewise. * i386linux.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * irix-core.c: Likewise. * lynx-core.c: Likewise. * m68klinux.c: Likewise. * mach-o.c: Likewise. * netbsd-core.c: Likewise. * nlmcode.h: Likewise. * opncls.c: Likewise. * osf-core.c: Likewise. * peXXigen.c: Likewise. * ppcboot.c: Likewise. * ptrace-core.c: Likewise. * rs6000-core.c: Likewise. * sco5-core.c: Likewise. * sparclinux.c: Likewise. * srec.c: Likewise. * sunos.c: Likewise. * trad-core.c: Likewise. * xcofflink.c: Likewise. * xsym.c: Likewise.
Diffstat (limited to 'bfd/cisco-core.c')
-rw-r--r--bfd/cisco-core.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/bfd/cisco-core.c b/bfd/cisco-core.c
index b7f735b59d..7d63118aef 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,