This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]