summaryrefslogtreecommitdiff
path: root/bfd/elf32-csky.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-12-07 14:03:47 +1030
committerAlan Modra <amodra@gmail.com>2020-12-07 22:17:05 +1030
commitfde0214a915dc09743006022df2365f8e9ea3eed (patch)
tree79c664a764b545c935133430c6bc610afffd2d4c /bfd/elf32-csky.c
parenta315d3902d6aa485c385f0b977da71cd7c3adb38 (diff)
elf32-csky.c:3932:19: error: comparison is always false
It looks like csky missed out on an edit for 706704c8834. 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.
Diffstat (limited to 'bfd/elf32-csky.c')
-rw-r--r--bfd/elf32-csky.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/bfd/elf32-csky.c b/bfd/elf32-csky.c
index 395e6ff67f..8d48a03aad 100644
--- a/bfd/elf32-csky.c
+++ b/bfd/elf32-csky.c
@@ -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. */