diff options
author | Alan Modra <amodra@gmail.com> | 2011-10-19 23:02:50 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2011-10-19 23:02:50 +0000 |
commit | fa289a5fde8cdc60336d6c53e75b1969f8a82f20 (patch) | |
tree | 3a82bcbec19924a3aac621617ffb1009bceabac3 /bfd/elf32-i386.c | |
parent | 0319698bac846d78b420cbdc760c29729b084601 (diff) | |
download | gdb-fa289a5fde8cdc60336d6c53e75b1969f8a82f20.zip gdb-fa289a5fde8cdc60336d6c53e75b1969f8a82f20.tar.gz gdb-fa289a5fde8cdc60336d6c53e75b1969f8a82f20.tar.bz2 |
* 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.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index 7434356..7ef1fc1 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; |