summaryrefslogtreecommitdiff
path: root/bfd/som.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2007-09-26 08:12:59 +0000
committerNick Clifton <nickc@redhat.com>2007-09-26 08:12:59 +0000
commit808c68c23368298df3260172ac2f51b710484f2f (patch)
tree47b00a0036441be0e5019bcf614b0cb1c3c06744 /bfd/som.c
parent3b33bf1f3d4f14969473466e13d1e92e526e990d (diff)
downloadbinutils-redhat-808c68c23368298df3260172ac2f51b710484f2f.tar.gz
* som.c (som_get_reloc_upper_bound): If there are no relocs return enough
space to hold a NULL pointer.
Diffstat (limited to 'bfd/som.c')
-rw-r--r--bfd/som.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/bfd/som.c b/bfd/som.c
index f36e3bc292..006af8cae2 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