diff --git a/binutils/readelf.c b/binutils/readelf.c index 2f8dda88913..3205cf2e69e 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -21025,8 +21025,9 @@ process_got_section_contents (Filedata * filedata) 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);