aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2020-07-22 02:17:38 -0700
committerMax Filippov <jcmvbkbc@gmail.com>2020-07-22 02:58:34 -0700
commit1ad2776d3db6d82cb59cef1495642fc7fcd57ed5 (patch)
tree069e3cde250315ca9fb07c9eb5322575ebb77e25 /bfd
parent4cec0c66899aed1eff0c5ef844e9bf658ab2b2af (diff)
downloadfsf-binutils-gdb-1ad2776d3db6d82cb59cef1495642fc7fcd57ed5.zip
fsf-binutils-gdb-1ad2776d3db6d82cb59cef1495642fc7fcd57ed5.tar.gz
fsf-binutils-gdb-1ad2776d3db6d82cb59cef1495642fc7fcd57ed5.tar.bz2
bfd: xtensa: pr26246: fix removed_literal_compare
2020-07-22 Max Filippov <jcmvbkbc@gmail.com> bfd/ PR 26246 * elf32-xtensa.c (removed_literal_compare): Use correct pointer type for the first function argument. Rename pointers to reflect that they have distinct types.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elf32-xtensa.c8
2 files changed, 11 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index d6a1d87..411c190 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2020-07-22 Max Filippov <jcmvbkbc@gmail.com>
+
+ PR 26246
+ * elf32-xtensa.c (removed_literal_compare): Use correct pointer
+ type for the first function argument. Rename pointers to reflect
+ that they have distinct types.
+
2020-07-20 Alan Modra <amodra@gmail.com>
* elflink.c (_bfd_elf_gc_keep): Use bfd_is_const_section.
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index 45727b3..8928b11 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -5989,13 +5989,13 @@ map_removed_literal (removed_literal_list *removed_list)
static int
removed_literal_compare (const void *a, const void *b)
{
- const removed_literal_map_entry *pa = a;
- const removed_literal_map_entry *pb = b;
+ const bfd_vma *key = a;
+ const removed_literal_map_entry *memb = b;
- if (pa->addr == pb->addr)
+ if (*key == memb->addr)
return 0;
else
- return pa->addr < pb->addr ? -1 : 1;
+ return *key < memb->addr ? -1 : 1;
}
/* Check if the list of removed literals contains an entry for the