Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gdb/dist/bfd don't forget to subtract the offs...



details:   https://anonhg.NetBSD.org/src/rev/4d41b82f0bc4
branches:  trunk
changeset: 770292:4d41b82f0bc4
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Oct 11 15:11:59 2011 +0000

description:
don't forget to subtract the offset; found by clang -Warray-bounds

diffstat:

 external/gpl3/gdb/dist/bfd/elf32-i386.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 2c2996dbe6e6 -r 4d41b82f0bc4 external/gpl3/gdb/dist/bfd/elf32-i386.c
--- a/external/gpl3/gdb/dist/bfd/elf32-i386.c   Tue Oct 11 15:10:17 2011 +0000
+++ b/external/gpl3/gdb/dist/bfd/elf32-i386.c   Tue Oct 11 15:11:59 2011 +0000
@@ -323,7 +323,7 @@
 
     case BFD_RELOC_386_IRELATIVE:
       TRACE ("BFD_RELOC_386_IRELATIVE");
-      return &elf_howto_table[R_386_IRELATIVE];
+      return &elf_howto_table[R_386_IRELATIVE - R_386_tls_offset];
 
     case BFD_RELOC_VTABLE_INHERIT:
       TRACE ("BFD_RELOC_VTABLE_INHERIT");



Home | Main Index | Thread Index | Old Index