summaryrefslogtreecommitdiff
path: root/bfd/elf32-i386.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2011-10-19 23:02:47 +0000
committerAlan Modra <amodra@bigpond.net.au>2011-10-19 23:02:47 +0000
commit70b39fd13f380ff0a238ca2984c3f4f270be1080 (patch)
tree985942f2778c06e44124c344067da74d88250927 /bfd/elf32-i386.c
parent1fe83688696249042ce84745a409f80992581c16 (diff)
downloadbinutils-redhat-70b39fd13f380ff0a238ca2984c3f4f270be1080.tar.gz
* elf32-i386.c (i386_opcode16): Delete.
(elf_i386_check_tls_transition): Use memcmp to compare contents. * elf64-x86-64.c (x86_64_opcode16, x86_64_opcode32): Delete. (elf_x86_64_check_tls_transition): Use memcmp to compare contents.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r--bfd/elf32-i386.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 74343560fd..7ef1fc1ec5 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1094,13 +1094,6 @@ elf_i386_copy_indirect_symbol (struct bfd_link_info *info,
_bfd_elf_link_hash_copy_indirect (info, dir, ind);
}
-typedef union
- {
- unsigned char c[2];
- uint16_t i;
- }
-i386_opcode16;
-
/* Return TRUE if the TLS access code sequence support transition
from R_TYPE. */
@@ -1271,8 +1264,8 @@ elf_i386_check_tls_transition (bfd *abfd, asection *sec,
if (offset + 2 <= sec->size)
{
/* Make sure that it's a call *x@tlsdesc(%rax). */
- static i386_opcode16 call = { { 0xff, 0x10 } };
- return bfd_get_16 (abfd, contents + offset) == call.i;
+ static const unsigned char call[] = { 0xff, 0x10 };
+ return memcmp (contents + offset, call, 2) == 0;
}
return FALSE;