x86: Don't change r_type when performing TLS transitions
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 6 Sep 2017 11:49:47 +0000 (04:49 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 6 Sep 2017 11:53:59 +0000 (04:53 -0700)
commit419414eafcee7cd749ee4622ef25020e48b52cc4
tree65f51f689818825a3d356ef500a7ee57649f2e8d
parentfbd1b77155bd8139033b72871dbe7bf5be6031b1
x86: Don't change r_type when performing TLS transitions

Don't change r_type when performing TLS transitions to avoid getting
the relocation type with ELF32_R_TYPE again.

* elf32-i386.c (elf_i386_relocate_section): Don't change r_type
when calling elf_i386_tls_transition.  Don't use ELF32_R_TYPE
to get the relocation type again.
* elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
r_type when calling elf_x86_64_tls_transition.  Don't use
ELF32_R_TYPE to get the relocation type again.
bfd/ChangeLog
bfd/elf32-i386.c
bfd/elf64-x86-64.c