From: Nick Clifton Date: Wed, 26 Sep 2007 08:12:59 +0000 (+0000) Subject: * som.c (som_get_reloc_upper_bound): If there are no relocs return enough X-Git-Tag: sid-snapshot-20071001~51 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=06dcabb0579335e3db3825385d41de58e529c7c0;p=external%2Fbinutils.git * som.c (som_get_reloc_upper_bound): If there are no relocs return enough space to hold a NULL pointer. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 690c46d..f93f756 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2007-09-26 Tristan Gingold + + * som.c (som_get_reloc_upper_bound): If there are no relocs return + enough space to hold a NULL pointer. + 2007-09-26 Alan Modra * elf64-ppc.c (ppc_build_one_stub): Correct rel_hdr.sh_size. diff --git a/bfd/som.c b/bfd/som.c index f36e3bc..006af8c 100644 --- a/bfd/som.c +++ b/bfd/som.c @@ -4939,8 +4939,11 @@ som_get_reloc_upper_bound (bfd *abfd, sec_ptr asect) return -1; return (asect->reloc_count + 1) * sizeof (arelent *); } - /* There are no relocations. */ - return 0; + + /* There are no relocations. Return enough space to hold the + NULL pointer which will be installed if som_canonicalize_reloc + is called. */ + return sizeof (arelent *); } /* Convert relocations from SOM (external) form into BFD internal