[PATCH] aout relocs
Ian Lance Taylor
Wed Jul 25 20:37:00 GMT 2007
> As near as I can tell, if reloc_size is zero, the routine does
> nothing useful. Maybe it will never be zero, but if it is, a few
> iffy things will happen:
> * we'll call malloc with a size of zero, which is ill defined,
> and later free the result
No, we'll call bfd_malloc with a size of zero. That is not
ill-defined. It will either return NULL, or not, as (confusingly)
specified in the C standard. Passing a NULL pointer to free will
> * we'll call bfd_bread with a size of zero, and
Which is fine.
> * a potentially null pointer may slip thru the cracks.
I'm not sure which pointer you mean here.
> 2007-07-25 Michael Snyder <firstname.lastname@example.org>
> * aoutx.h (NAME): Return TRUE if reloc_size is zero.
I have no particular objection to this patch, but the ChangeLog entry
is wrong. Emacs ^x 4 a will misfire in these functions; you have to
fill in the name manually.
I have to ask, though: why a.out?
More information about the Binutils