diff options
author | Nick Clifton <nickc@redhat.com> | 2009-06-18 10:48:58 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2009-06-18 10:48:58 +0000 |
commit | 5e486aa1337535581cb22545e8bb39e3e029bac2 (patch) | |
tree | e656771fac109d581bcaada5e24318d5e7f9f5d0 /bfd/elflink.c | |
parent | 32425da952b9dd3668ef750690eeaab6d8393cbd (diff) | |
download | gdb-5e486aa1337535581cb22545e8bb39e3e029bac2.zip gdb-5e486aa1337535581cb22545e8bb39e3e029bac2.tar.gz gdb-5e486aa1337535581cb22545e8bb39e3e029bac2.tar.bz2 |
* elflink.c (elf_link_sort_relocs): Return early if there are no
relocs to sort.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index 70bca46..2366dd40 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) |