elf32-csky.c:3932:19: error: comparison is always false

It looks like csky missed out on an edit for 706704c883.  Not that it
matters very much.  There doesn't appear to be any csky reloc howto
that sets the negate bit.

Similarly for ns32k and nds32.

	* elf32-csky.c (csky_relocate_contents): Correct negate test.
	* cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Likewise.
	* elf32-nds32.c (nds32_relocate_contents): Likewise.
This commit is contained in:
Alan Modra 2020-12-07 14:03:47 +10:30
parent a315d3902d
commit fde0214a91
4 changed files with 9 additions and 9 deletions

View File

@ -1,3 +1,9 @@
2020-12-07 Alan Modra <amodra@gmail.com>
* elf32-csky.c (csky_relocate_contents): Correct negate test.
* cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Likewise.
* elf32-nds32.c (nds32_relocate_contents): Likewise.
2020-12-05 Maciej W. Rozycki <macro@linux-mips.org>
* elf32-vax.c (elf_vax_check_relocs) <R_VAX_GOT32>: Use

View File

@ -574,9 +574,7 @@ _bfd_do_ns32k_reloc_contents (reloc_howto_type *howto,
bfd_vma x;
bfd_boolean overflow;
/* If the size is negative, negate RELOCATION. This isn't very
general. */
if (howto->size < 0)
if (howto->negate)
relocation = -relocation;
/* Get the value we are going to relocate. */

View File

@ -3927,9 +3927,7 @@ csky_relocate_contents (reloc_howto_type *howto,
unsigned int rightshift = howto->rightshift;
unsigned int bitpos = howto->bitpos;
/* If the size is negative, negate RELOCATION. This isn't very
general. */
if (howto->size < 0)
if (howto->negate)
relocation = -relocation;
/* FIXME: these macros should be defined at file head or head file head. */

View File

@ -4492,9 +4492,7 @@ nds32_relocate_contents (reloc_howto_type *howto, bfd *input_bfd,
unsigned int rightshift = howto->rightshift;
unsigned int bitpos = howto->bitpos;
/* If the size is negative, negate RELOCATION. This isn't very
general. */
if (howto->size < 0)
if (howto->negate)
relocation = -relocation;
/* Get the value we are going to relocate. */