aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-03-20 08:25:50 +1030
committerAlan Modra <amodra@gmail.com>2017-03-20 08:27:16 +1030
commitaaed6f5be3a41a88cc13c744e88af78f5a42dd5b (patch)
tree9d81a9da39cefcdcdda0511e33aae3f0a8602d5c /bfd
parent84e8538ee3c8139a99e75e661fff500bb93c8cd5 (diff)
downloadgdb-aaed6f5be3a41a88cc13c744e88af78f5a42dd5b.zip
gdb-aaed6f5be3a41a88cc13c744e88af78f5a42dd5b.tar.gz
gdb-aaed6f5be3a41a88cc13c744e88af78f5a42dd5b.tar.bz2
PR 21266, unstable qsort in bfd/elf64-ppc.c
PR 21266 * elf64-ppc.c (compare_symbols): Stabilize sort.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf64-ppc.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 5dea352..50e76c2 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2017-03-20 Alan Modra <amodra@gmail.com>
+
+ PR 21266
+ * elf64-ppc.c (compare_symbols): Stabilize sort.
+
2017-03-18 Alan Modra <amodra@gmail.com>
* elf64-ppc.c (struct ppc_link_hash_table): Add
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 1193c1f..ae39032 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. */