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.
This commit is contained in:
Max Filippov 2020-07-22 02:17:38 -07:00
parent 4cec0c6689
commit 1ad2776d3d
2 changed files with 11 additions and 4 deletions

View file

@ -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.

View file

@ -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