From: Nick Clifton Date: Thu, 18 Jun 2009 10:48:58 +0000 (+0000) Subject: * elflink.c (elf_link_sort_relocs): Return early if there are no X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5e486aa1337535581cb22545e8bb39e3e029bac2;p=binutils-gdb.git * elflink.c (elf_link_sort_relocs): Return early if there are no relocs to sort. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index b1ebfcfcc8e..8f3edb08d72 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2009-06-18 Nick Clifton + + * elflink.c (elf_link_sort_relocs): Return early if there are no + relocs to sort. + 2009-06-18 Dave Korn Merge cegcc and mingw32ce target name changes from diff --git a/bfd/elflink.c b/bfd/elflink.c index 70bca46953e..2366dd40478 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -8082,6 +8082,8 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec) + (i2e - 1) * sizeof (Elf_Internal_Rela)); count = dynamic_relocs->size / ext_size; + if (count == 0) + return 0; sort = bfd_zmalloc (sort_elt * count); if (sort == NULL)