This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: fix som_get_reloc_upper_bound if no reloc
- From: Tristan Gingold <gingold at adacore dot com>
- To: binutils at sourceware dot org
- Date: Fri, 21 Sep 2007 14:08:16 +0200
- Subject: PATCH: fix som_get_reloc_upper_bound if no reloc
Hi,
this seems to be an obvious patch: if there are no relocs,
bfd_get_reloc_upper_bound should returns
sizeof (arelent *) for the ending NULL (and not 0).
Tristan.
2007-09-21 Tristan Gingold <gingold@adacore.com>
* som.c (som_get_reloc_upper_bound): Returns sizeof (arelent *)
instead of 0 if there are no relocs.
*** bfd/som.c 21 Sep 2007 07:58:03 -0000 1.67
--- bfd/som.c 21 Sep 2007 12:04:18 -0000
*************** som_get_reloc_upper_bound (bfd *abfd, se
*** 4940,4946 ****
return (asect->reloc_count + 1) * sizeof (arelent *);
}
/* There are no relocations. */
! return 0;
}
/* Convert relocations from SOM (external) form into BFD internal
--- 4940,4946 ----
return (asect->reloc_count + 1) * sizeof (arelent *);
}
/* There are no relocations. */
! return sizeof (arelent *);
}
/* Convert relocations from SOM (external) form into BFD internal