summaryrefslogtreecommitdiff
path: root/bfd/elf32-i386.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2011-04-11 18:27:21 +0000
committerH.J. Lu <hjl.tools@gmail.com>2011-04-11 18:27:21 +0000
commitdccc55e90ac5125315cee6ea706b5dd3e5f168ed (patch)
treefb1876c67eeb73971f7659d3b7bc64c5c3e33f6f /bfd/elf32-i386.c
parentd4d68cb45a56d7e68f9efe2855df7cfa6b4f87bd (diff)
downloadbinutils-redhat-dccc55e90ac5125315cee6ea706b5dd3e5f168ed.tar.gz
Fix the array access for BFD_RELOC_386_IRELATIVE.
2011-04-11 H.J. Lu <hongjiu.lu@intel.com> * elf32-i386.c (elf_i386_reloc_type_lookup): Fix the out of bound array access for BFD_RELOC_386_IRELATIVE.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r--bfd/elf32-i386.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 189688126f..8934d27786 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -324,7 +324,7 @@ elf_i386_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
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");