summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-06-18 10:48:58 +0000
committerNick Clifton <nickc@redhat.com>2009-06-18 10:48:58 +0000
commitbdd3293851ce8b0d4c72361a847ad7e4aed074f8 (patch)
treef8f6b26e8db3ae08337fc3d27108a1114df2a509 /bfd
parent7e008d8d041bc99dc1a7cdc1d8ee1a6cfe0b5c82 (diff)
downloadbinutils-redhat-bdd3293851ce8b0d4c72361a847ad7e4aed074f8.tar.gz
* elflink.c (elf_link_sort_relocs): Return early if there are no
relocs to sort.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elflink.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index b1ebfcfcc8..8f3edb08d7 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2009-06-18 Nick Clifton <nickc@redhat.com>
+
+ * elflink.c (elf_link_sort_relocs): Return early if there are no
+ relocs to sort.
+
2009-06-18 Dave Korn <dave.korn.cygwin@gmail.com>
Merge cegcc and mingw32ce target name changes from
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 70bca46953..2366dd4047 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)