correct ft32 reloc range test

Message ID 20180228224811.GB3812@bubble.grove.modra.org
State New
Headers show
Series
  • correct ft32 reloc range test
Related show

Commit Message

Alan Modra Feb. 28, 2018, 10:48 p.m.
* elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.


-- 
Alan Modra
Australia Development Lab, IBM

Patch

diff --git a/bfd/elf32-ft32.c b/bfd/elf32-ft32.c
index b981a34..7c4e1ae 100644
--- a/bfd/elf32-ft32.c
+++ b/bfd/elf32-ft32.c
@@ -300,7 +300,7 @@  ft32_info_to_howto_rela (bfd *abfd,
   unsigned int r_type;
 
   r_type = ELF32_R_TYPE (dst->r_info);
-  if (r_type < (unsigned int) R_FT32_max)
+  if (r_type >= (unsigned int) R_FT32_max)
     {
       /* xgettext:c-format */
       _bfd_error_handler (_("%pB: unsupported relocation type %#x"),