aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2007-02-27 08:29:52 +0000
committerAlan Modra <amodra@gmail.com>2007-02-27 08:29:52 +0000
commit7a8757b3194d57d783bccfe2b1b206990d6396b6 (patch)
tree8eb5c3d2399fad38bd289335735bff13cedd49cc
parentfd99afa763de5aec45193afc7100c475e8b2c493 (diff)
downloadgdb-7a8757b3194d57d783bccfe2b1b206990d6396b6.zip
gdb-7a8757b3194d57d783bccfe2b1b206990d6396b6.tar.gz
gdb-7a8757b3194d57d783bccfe2b1b206990d6396b6.tar.bz2
* elf32-spu.h (struct _ovl_stream): Make "start" and "end" const.
* elf32-spu.c (ovl_mgr_pread): Add const to casts.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-spu.c4
-rw-r--r--bfd/elf32-spu.h6
3 files changed, 10 insertions, 5 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index adde103..a66c0f26 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2007-02-27 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-spu.h (struct _ovl_stream): Make "start" and "end" const.
+ * elf32-spu.c (ovl_mgr_pread): Add const to casts.
+
2007-02-23 Carlos O'Donell <carlos@codesourcery.com>
* dwarf2.c (_bfd_dwarf2_find_nearest_line): Assume 32-bit
diff --git a/bfd/elf32-spu.c b/bfd/elf32-spu.c
index 978792b..7b08e3c 100644
--- a/bfd/elf32-spu.c
+++ b/bfd/elf32-spu.c
@@ -1069,7 +1069,7 @@ ovl_mgr_pread (struct bfd *abfd ATTRIBUTE_UNUSED,
size_t max;
os = (struct _ovl_stream *) stream;
- max = (char *) os->end - (char *) os->start;
+ max = (const char *) os->end - (const char *) os->start;
if ((ufile_ptr) offset >= max)
return 0;
@@ -1078,7 +1078,7 @@ ovl_mgr_pread (struct bfd *abfd ATTRIBUTE_UNUSED,
if (count > max - offset)
count = max - offset;
- memcpy (buf, (char *) os->start + offset, count);
+ memcpy (buf, (const char *) os->start + offset, count);
return count;
}
diff --git a/bfd/elf32-spu.h b/bfd/elf32-spu.h
index 2d6eaf3..49c233a 100644
--- a/bfd/elf32-spu.h
+++ b/bfd/elf32-spu.h
@@ -1,6 +1,6 @@
/* SPU specific support for 32-bit ELF.
- Copyright 2006 Free Software Foundation, Inc.
+ Copyright 2006, 2007 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -33,8 +33,8 @@ struct _spu_elf_section_data
struct _ovl_stream
{
- void *start;
- void *end;
+ const void *start;
+ const void *end;
};
extern void spu_elf_plugin (int);