PATCH: fix som_get_reloc_upper_bound if no reloc
Tristan Gingold
gingold@adacore.com
Fri Sep 21 13:07:00 GMT 2007
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
More information about the Binutils
mailing list