From 64b49cceb50bbac54177ffeb120a64092de90f75 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 15 Jun 2004 02:18:51 +0000 Subject: [PATCH] * dumper.cc (dumper::prepare_core_dump): Use bfd_get_section_size instead of _raw_size. (dumper::write_core_dump): Likewise. * parse_pe.cc (select_data_section): Likewise. --- winsup/utils/ChangeLog | 7 +++++++ winsup/utils/dumper.cc | 7 ++++--- winsup/utils/parse_pe.cc | 9 +++++---- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 385e4bfba..21c589488 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,10 @@ +2004-06-15 Alan Modra + + * dumper.cc (dumper::prepare_core_dump): Use bfd_get_section_size + instead of _raw_size. + (dumper::write_core_dump): Likewise. + * parse_pe.cc (select_data_section): Likewise. + 2004-05-29 John Paul Wallington * ssp.c (usage): Add missing linefeed. diff --git a/winsup/utils/dumper.cc b/winsup/utils/dumper.cc index 5a9beec93..aec8b12a3 100644 --- a/winsup/utils/dumper.cc +++ b/winsup/utils/dumper.cc @@ -1,6 +1,6 @@ /* dumper.cc - Copyright 1999, 2001, 2002 Red Hat Inc. + Copyright 1999, 2001, 2002, 2004 Red Hat Inc. Written by Egor Duda @@ -689,7 +689,8 @@ dumper::prepare_core_dump () { if (!bfd_set_section_size (core_bfd, status_section, - status_section->_raw_size + sect_size)) + (bfd_get_section_size (status_section) + + sect_size))) { bfd_perror ("resizing status section"); goto failed; @@ -746,7 +747,7 @@ dumper::write_core_dump () deb_printf ("writing section type=%u base=%08x size=%08x flags=%08x\n", p->type, p->section->vma, - p->section->_raw_size, + bfd_get_section_size (p->section), p->section->flags); switch (p->type) diff --git a/winsup/utils/parse_pe.cc b/winsup/utils/parse_pe.cc index 4dc7d4f0a..48c71db7e 100644 --- a/winsup/utils/parse_pe.cc +++ b/winsup/utils/parse_pe.cc @@ -1,6 +1,6 @@ /* parse_pe.cc - Copyright 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. Written by Egor Duda @@ -64,10 +64,11 @@ select_data_section (bfd * abfd, asection * sect, PTR obj) exclusion *excl_list = (exclusion *) obj; if ((sect->flags & (SEC_CODE | SEC_DEBUGGING)) && - sect->vma && sect->_raw_size) + sect->vma && bfd_get_section_size (sect)) { - excl_list->add ((LPBYTE) sect->vma, (DWORD) sect->_raw_size); - deb_printf ("excluding section: %20s %08lx\n", sect->name, sect->_raw_size); + excl_list->add ((LPBYTE) sect->vma, (DWORD) bfd_get_section_size (sect)); + deb_printf ("excluding section: %20s %08lx\n", sect->name, + bfd_get_section_size (sect)); } }