* elf32-spu.h (struct _ovl_stream): Make "start" and "end" const.
authorAlan Modra <amodra@gmail.com>
Tue, 27 Feb 2007 08:29:52 +0000 (08:29 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 27 Feb 2007 08:29:52 +0000 (08:29 +0000)
* elf32-spu.c (ovl_mgr_pread): Add const to casts.

bfd/ChangeLog
bfd/elf32-spu.c
bfd/elf32-spu.h

index adde10365c436a2d3ed1573f7758a4685ce983d5..a66c0f2698842135c94594cca8014813d8e62120 100644 (file)
@@ -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
index 978792b5efc811df993b07041758e6df41c0e4aa..7b08e3cd6a2c9ded902988dba49cd259d45e068e 100644 (file)
@@ -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;
 }
 
index 2d6eaf3c634f497479e6ed908d8706ee319142b1..49c233a09ca04dcdfa5d3845445488a77e325bd6 100644 (file)
@@ -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);
This page took 0.029441 seconds and 4 git commands to generate.