}
}
- /* Force 0x8b encoding for "mov foo@GOT, %eax". */
- if (i.reloc[0] == BFD_RELOC_386_GOT32
- && t->base_opcode == 0xa0
- && t->opcode_modifier.opcodespace == SPACE_BASE)
- continue;
+ switch (i.reloc[0])
+ {
+ case BFD_RELOC_386_GOT32:
+ /* Force 0x8b encoding for "mov foo@GOT, %eax". */
+ if (t->base_opcode == 0xa0
+ && t->opcode_modifier.opcodespace == SPACE_BASE)
+ continue;
+ break;
+ case BFD_RELOC_386_TLS_GOTIE:
+ case BFD_RELOC_386_TLS_LE_32:
+ case BFD_RELOC_X86_64_GOTTPOFF:
+ case BFD_RELOC_X86_64_TLSLD:
+ /* Don't allow KMOV in TLS code sequences. */
+ if (t->opcode_modifier.vex)
+ continue;
+ break;
+ default:
+ break;
+ }
/* We check register size if needed. */
if (t->opcode_modifier.checkregsize)
run_dump_test "tlsd"
run_dump_test "tlspic"
run_dump_test "tlsnopic"
+ run_list_test "inval-tls"
run_dump_test "bss"
run_dump_test "reloc32"
run_list_test "reloc32" "--defsym _bad_=1"
run_dump_test "reloc64"
run_list_test "reloc64" "--defsym _bad_=1"
+ run_list_test "x86-64-inval-tls"
run_dump_test "mixed-mode-reloc64"
run_dump_test "rela"
run_dump_test "x86-64-ifunc"
--- /dev/null
+ .text
+# All the following should be illegal
+ kmovd foo@gotntpoff(%eax), %k0
+ kmovd foo@tpoff(%eax), %k0
--- /dev/null
+ .text
+# All the following should be illegal
+ kmovq foo@gottpoff(%rip), %k0
+ kmovq foo@tlsld(%rip), %k0