mirror of
https://github.com/bminor/binutils-gdb.git
synced 2026-02-05 04:21:30 +00:00
readelf: Call qsort only if all_relocations_count > 1
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>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user