Don't call qsort if all_relocations_count < 1.
PR binutils/33351
* readelf.c (process_got_section_contents): Call qsort only if
all_relocations_count > 1.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
goto out;
}
- qsort (all_relocations_root, all_relocations_count,
- sizeof (elf_relocation), elf_relocation_cmp);
+ if (all_relocations_count > 1)
+ qsort (all_relocations_root, all_relocations_count,
+ sizeof (elf_relocation), elf_relocation_cmp);
initialise_dumps_byname (filedata);