diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2010-10-30 23:02:32 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2010-10-30 23:02:32 +0000 |
commit | b3cded65e92ba4d9b5e5a33fb95c4d551bda9c1b (patch) | |
tree | 69d40fbef2c0c4ee32fe97b7a28b510f2e3c2dbc /bfd/ptrace-core.c | |
parent | 7a815afd9b5121ee0f65dc1e1de1c0de6de97679 (diff) |
Import the binutils master branch from the sourceware CVS repository,vendor/binutils/binutils-master-20070703-075419vendor/binutils
exactly as it was on Tue, 3 Jul 2007 07:54:19 +0000.
Corresponds to git commit 397a64b350470350c8e0adb2af84439ea0f89272,
which was the last commit before switching to GPLv3.
Notes
Notes:
svn path=/vendor/binutils/dist/; revision=214571
svn path=/vendor/binutils/binutils-master-20070703-075419/; revision=214573; tag=vendor/binutils/binutils-master-20070703-075419
Diffstat (limited to 'bfd/ptrace-core.c')
-rw-r--r-- | bfd/ptrace-core.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/bfd/ptrace-core.c b/bfd/ptrace-core.c index 4ac28aa1dece..8607225da16f 100644 --- a/bfd/ptrace-core.c +++ b/bfd/ptrace-core.c @@ -1,6 +1,6 @@ /* BFD backend for core files which use the ptrace_user structure - Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2001, 2002, 2003, 2004 - Free Software Foundation, Inc. + Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2001, 2002, 2003, 2004, + 2006, 2007 Free Software Foundation, Inc. The structure of this file is based on trad-core.c written by John Gilmore of Cygnus Support. Modified to work with the ptrace_user structure by Kevin A. Buettner. @@ -24,8 +24,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. #ifdef PTRACE_CORE -#include "bfd.h" #include "sysdep.h" +#include "bfd.h" #include "libbfd.h" #include <sys/param.h> @@ -63,6 +63,7 @@ ptrace_unix_core_file_p (abfd) struct ptrace_user u; struct trad_core_struct *rawptr; bfd_size_type amt; + flagword flags; val = bfd_bread ((void *)&u, (bfd_size_type) sizeof u, abfd); if (val != sizeof u || u.pt_magic != _BCS_PTRACE_MAGIC @@ -89,13 +90,17 @@ ptrace_unix_core_file_p (abfd) /* Create the sections. */ - core_stacksec (abfd) = bfd_make_section_anyway (abfd, ".stack"); + flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS; + core_stacksec (abfd) = bfd_make_section_anyway_with_flags (abfd, ".stack", + flags); if (core_stacksec (abfd) == NULL) goto fail; - core_datasec (abfd) = bfd_make_section_anyway (abfd, ".data"); + core_datasec (abfd) = bfd_make_section_anyway_with_flags (abfd, ".data", + flags); if (core_datasec (abfd) == NULL) goto fail; - core_regsec (abfd) = bfd_make_section_anyway (abfd, ".reg"); + core_regsec (abfd) = bfd_make_section_anyway_with_flags (abfd, ".reg", + SEC_HAS_CONTENTS); if (core_regsec (abfd) == NULL) goto fail; @@ -103,10 +108,6 @@ ptrace_unix_core_file_p (abfd) text. I don't think that any of these things are supported on the system on which I am developing this for though. */ - core_stacksec (abfd)->flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS; - core_datasec (abfd)->flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS; - core_regsec (abfd)->flags = SEC_HAS_CONTENTS; - core_datasec (abfd)->size = u.pt_dsize; core_stacksec (abfd)->size = u.pt_ssize; core_regsec (abfd)->size = sizeof (u); |