2009-06-22 Tristan Gingold <gingold@adacore.com>
authorTristan Gingold <gingold@adacore.com>
Mon, 22 Jun 2009 08:14:52 +0000 (08:14 +0000)
committerTristan Gingold <gingold@adacore.com>
Mon, 22 Jun 2009 08:14:52 +0000 (08:14 +0000)
* mach-o.c (bfd_mach_o_canonicalize_reloc): Append a sentinel to
the relocs array.

bfd/ChangeLog
bfd/mach-o.c

index 11bfbfc..7e7b526 100644 (file)
@@ -1,3 +1,8 @@
+2009-06-22  Tristan Gingold  <gingold@adacore.com>
+
+       * mach-o.c (bfd_mach_o_canonicalize_reloc): Append a sentinel to
+       the relocs array.
+
 2009-06-22  Alan Modra  <amodra@bigpond.net.au>
 
        * elf32-ppc.c (ppc_elf_check_relocs): Handle R_PPC_RELAX* in switch.
index cf1d1e0..8071dee 100644 (file)
@@ -615,6 +615,7 @@ bfd_mach_o_canonicalize_reloc (bfd *abfd, asection *asect,
         }
       rels[i] = &res[i];
     }
+  rels[asect->reloc_count] = NULL;
   asect->relocation = res;
   free (native_relocs);
   return i;