This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] correct ft32 reloc range test


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5224fa039966557e869338d2591e7945cdcecb74

commit 5224fa039966557e869338d2591e7945cdcecb74
Author: Alan Modra <amodra@gmail.com>
Date:   Thu Mar 1 08:21:11 2018 +1030

    correct ft32 reloc range test
    
    	* elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.

Diff:
---
 bfd/ChangeLog    | 4 ++++
 bfd/elf32-ft32.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 91bc2ef..e2c5789 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2018-03-01  Alan Modra  <amodra@gmail.com>
+
+	* elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
+
 2018-02-28  Alan Modra  <amodra@gmail.com>
 
 	PR 22887
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"),


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]