diff options
author | Nick Clifton <nickc@redhat.com> | 2005-08-09 08:56:36 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2005-08-09 08:56:36 +0000 |
commit | fd6212e6f14b57e41d0e27753ea810e5d60c6775 (patch) | |
tree | 85a30c8587e2b04aa300c40b4b9375022e65ba74 /bfd | |
parent | 66bcaf1f1c3a85e878ac653da85141aca9f102c1 (diff) | |
download | binutils-gdb-fd6212e6f14b57e41d0e27753ea810e5d60c6775.tar.gz |
(xcoff64_core_p): Constify return_value variable. Also, do not use core_hdr
macro as it evaluates to a cast of an lvalue which is no longer supported by
GCC 4.0.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 7 | ||||
-rw-r--r-- | bfd/aix5ppc-core.c | 9 |
2 files changed, 13 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 9fd5c3b16bb..875a2e935aa 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2005-08-09 Rodney Brown <rbrown@bravurasolutions.com.au> + Nick Clifton <nickc@redhat.com> + + * aix5ppc-core.c (xcoff64_core_p): Constify return_value + variable. Also, do not use core_hdr macro as it evaluates to a + cast of an lvalue which is no longer supported by GCC 4.0. + 2005-08-08 Eric Dönges <Eric.Doenges@betty-tv.com> * archures.c (bfd_mach_msp21): New MSP430 machine number. diff --git a/bfd/aix5ppc-core.c b/bfd/aix5ppc-core.c index 89b6d8afe58..6b588ba3e61 100644 --- a/bfd/aix5ppc-core.c +++ b/bfd/aix5ppc-core.c @@ -1,5 +1,5 @@ /* IBM RS/6000 "XCOFF" back-end for BFD. - Copyright 2001, 2002, 2003, 2004 + Copyright 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Written by Tom Rix Contributed by Red Hat Inc. @@ -55,7 +55,7 @@ xcoff64_core_p (bfd *abfd) bfd_vma ld_offset; bfd_size_type i; struct vm_infox vminfo; - bfd_target *return_value = NULL; + const bfd_target *return_value = NULL; /* Get the header. */ if (bfd_seek (abfd, 0, SEEK_SET) != 0) @@ -111,7 +111,10 @@ xcoff64_core_p (bfd *abfd) return return_value; memcpy (new_core_hdr, &core, sizeof (struct core_dumpxx)); - core_hdr(abfd) = (char *)new_core_hdr; + /* The core_hdr() macro is no longer used here because it would + expand to code relying on gcc's cast-as-lvalue extension, + which was removed in gcc 4.0. */ + abfd->tdata.any = new_core_hdr; /* .stack section. */ sec = bfd_make_section_anyway (abfd, ".stack"); |