summaryrefslogtreecommitdiffstats
path: root/bfd/elf32-i386.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2011-04-11 18:27:23 +0000
committerH.J. Lu <hjl.tools@gmail.com>2011-04-11 18:27:23 +0000
commit2a750708dccb3e29e7e4c346debd89194f3e4748 (patch)
tree7d770ad4fecbf1716d96eeb05e51cb9ea296a044 /bfd/elf32-i386.c
parente1ab1f9c669fbcb1a13218823dd08592bddb90d8 (diff)
downloadppe42-binutils-2a750708dccb3e29e7e4c346debd89194f3e4748.tar.gz
ppe42-binutils-2a750708dccb3e29e7e4c346debd89194f3e4748.zip
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");
OpenPOWER on IntegriCloud