From: Alan Modra Date: Sun, 19 Mar 2017 21:55:50 +0000 (+1030) Subject: PR 21266, unstable qsort in bfd/elf64-ppc.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aaed6f5be3a41a88cc13c744e88af78f5a42dd5b;p=binutils-gdb.git PR 21266, unstable qsort in bfd/elf64-ppc.c PR 21266 * elf64-ppc.c (compare_symbols): Stabilize sort. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 5dea352b44d..50e76c2dea7 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2017-03-20 Alan Modra + + PR 21266 + * elf64-ppc.c (compare_symbols): Stabilize sort. + 2017-03-18 Alan Modra * elf64-ppc.c (struct ppc_link_hash_table): Add diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 1193c1f5d79..ae3903289a9 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -3188,7 +3188,7 @@ compare_symbols (const void *ap, const void *bp) if ((a->flags & BSF_DYNAMIC) == 0 && (b->flags & BSF_DYNAMIC) != 0) return 1; - return 0; + return a > b; } /* Search SYMS for a symbol of the given VALUE. */