old-cross-binutils/ld/testsuite/ld-x86-64/tlsdesc.dd
H.J. Lu 10efb593b7 bfd/
2006-06-30  H.J. Lu  <hongjiu.lu@intel.com>

	* elf32-i386.c (elf_i386_relocate_section): Use xchg %ax,%ax
	instead of 2 nops.
	* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
	(elf64_x86_64_plt0_entry): Use nopl 0(%rax) instead of 4 nops.

ld/testsuite/

2006-06-30  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-i386/tlsbindesc.dd: Updated to expect xchg %ax,%ax instead
	of 2 nops.
	* ld-i386/tlsdesc.dd: Likewise.
	* ld-i386/tlsgdesc.dd: Likewise.
	* ld-x86-64/tlsbindesc.dd: Likewise.
	* ld-x86-64/tlsdesc.dd: Likewise.
	* ld-x86-64/tlsdesc.pd: Likewise.
	* ld-x86-64/tlsgdesc.dd: Likewise.
2006-06-30 14:16:13 +00:00

200 lines
6.9 KiB
Text

#source: tlsdesc.s
#source: tlspic2.s
#as: --64
#ld: -shared -melf_x86_64
#objdump: -drj.text
#target: x86_64-*-*
.*: +file format elf64-x86-64
Disassembly of section .text:
0+[0-9a-f]+ <fn1>:
+[0-9a-f]+: 55[ ]+push %rbp
+[0-9a-f]+: 48 89 e5[ ]+mov %rsp,%rbp
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
# GD
+[0-9a-f]+: 48 8d 05 89 03 20 00[ ]+lea 2098057\(%rip\),%rax +# 201398 <.*>
# -> R_X86_64_TLSDESC sg1
+[0-9a-f]+: ff 10[ ]+callq \*\(%rax\)
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
# GD -> IE because variable is referenced through IE too
+[0-9a-f]+: 48 8b 05 1c 03 20 00[ ]+mov 2097948\(%rip\),%rax +# 201338 <.*>
# -> R_X86_64_TPOFF64 sg2
+[0-9a-f]+: 66 90[ ]+xchg %ax,%ax
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
# GD against local variable
+[0-9a-f]+: 48 8d 05 3f 03 20 00[ ]+lea 2097983\(%rip\),%rax +# 201368 <.*>
# -> R_X86_64_TLSDESC [0 0x2000000000000000]
+[0-9a-f]+: ff 10[ ]+callq \*\(%rax\)
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
# GD -> IE against local variable referenced through IE too
+[0-9a-f]+: 48 8b 05 d2 02 20 00[ ]+mov 2097874\(%rip\),%rax +# 201308 <.*>
# -> R_X86_64_TPOFF64 *ABS*+0x24
+[0-9a-f]+: 66 90[ ]+xchg %ax,%ax
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
# GD against hidden and local variable
+[0-9a-f]+: 48 8d 05 65 03 20 00[ ]+lea 2098021\(%rip\),%rax +# 2013a8 <.*>
# -> R_X86_64_TLSDESC [0 0x4000000000000000]
+[0-9a-f]+: ff 10[ ]+callq \*\(%rax\)
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
# GD -> IE against hidden and local variable referenced through IE too
+[0-9a-f]+: 48 8b 05 f0 02 20 00[ ]+mov 2097904\(%rip\),%rax +# 201340 <.*>
# -> R_X86_64_TPOFF64 *ABS*+0x44
+[0-9a-f]+: 66 90[ ]+xchg %ax,%ax
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
# GD against hidden but not local variable
+[0-9a-f]+: 48 8d 05 1b 03 20 00[ ]+lea 2097947\(%rip\),%rax +# 201378 <.*>
# -> R_X86_64_TLSDESC [0 0x6000000000000000]
+[0-9a-f]+: ff 10[ ]+callq \*\(%rax\)
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
# GD -> IE against hidden but not local variable referenced through IE too
+[0-9a-f]+: 48 8b 05 ae 02 20 00[ ]+mov 2097838\(%rip\),%rax +# 201318 <.*>
# -> R_X86_64_TPOFF64 *ABS*+0x64
+[0-9a-f]+: 66 90[ ]+xchg %ax,%ax
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
# LD
+[0-9a-f]+: 48 8d 05 11 03 20 00[ ]+lea 2097937\(%rip\),%rax +# 201388 <.*>
# -> R_X86_64_TLSDESC [0 0x000000000000000]
+[0-9a-f]+: ff 10[ ]+callq \*\(%rax\)
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 48 8d 90 20 00 00 00[ ]+lea 0x20\(%rax\),%rdx
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 4c 8d 88 26 00 00 00[ ]+lea 0x26\(%rax\),%r9
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
# LD against hidden and local variables
+[0-9a-f]+: 48 8d 90 40 00 00 00[ ]+lea 0x40\(%rax\),%rdx
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 48 8d 88 47 00 00 00[ ]+lea 0x47\(%rax\),%rcx
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
# LD against hidden but not local variables
+[0-9a-f]+: 4c 8d a0 60 00 00 00[ ]+lea 0x60\(%rax\),%r12
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 48 8d 88 65 00 00 00[ ]+lea 0x65\(%rax\),%rcx
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
# IE against global var
+[0-9a-f]+: 64 48 8b 0c 25 00 00[ ]+mov %fs:0x0,%rcx
+[0-9a-f]+: 00 00 *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 48 03 0d 71 02 20 00[ ]+add 2097777\(%rip\),%rcx +# 201338 <.*>
# -> R_X86_64_TPOFF64 sg2
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
# IE against local var
+[0-9a-f]+: 64 4c 8b 34 25 00 00[ ]+mov %fs:0x0,%r14
+[0-9a-f]+: 00 00 *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 4c 03 35 2b 02 20 00[ ]+add 2097707\(%rip\),%r14 +# 201308 <.*>
# -> R_X86_64_TPOFF64 *ABS*+0x24
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
# IE against hidden and local var
+[0-9a-f]+: 64 48 8b 0c 25 00 00[ ]+mov %fs:0x0,%rcx
+[0-9a-f]+: 00 00 *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 48 03 0d 4d 02 20 00[ ]+add 2097741\(%rip\),%rcx +# 201340 <.*>
# -> R_X86_64_TPOFF64 *ABS*+0x44
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
# IE against hidden but not local var
+[0-9a-f]+: 64 48 8b 0c 25 00 00[ ]+mov %fs:0x0,%rcx
+[0-9a-f]+: 00 00 *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 48 03 0d 0f 02 20 00[ ]+add 2097679\(%rip\),%rcx +# 201318 <.*>
# -> R_X86_64_TPOFF64 *ABS*+0x64
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
# Direct access through %fs
# IE against global var
+[0-9a-f]+: 48 8b 0d 0c 02 20 00[ ]+mov 2097676\(%rip\),%rcx +# 201320 <.*>
# -> R_X86_64_TPOFF64 sg5
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 64 48 8b 11[ ]+mov %fs:\(%rcx\),%rdx
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
# IE against local var
+[0-9a-f]+: 4c 8b 15 eb 01 20 00[ ]+mov 2097643\(%rip\),%r10 +# 201310 <.*>
# -> R_X86_64_TPOFF64 *ABS*+0x30
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 64 4d 8b 22[ ]+mov %fs:\(%r10\),%r12
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
# IE against hidden and local var
+[0-9a-f]+: 48 8b 15 f2 01 20 00[ ]+mov 2097650\(%rip\),%rdx +# 201328 <.*>
# -> R_X86_64_TPOFF64 *ABS*+0x50
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 64 48 8b 12[ ]+mov %fs:\(%rdx\),%rdx
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
# IE against hidden but not local var
+[0-9a-f]+: 48 8b 0d e9 01 20 00[ ]+mov 2097641\(%rip\),%rcx +# 201330 <.*>
# -> R_X86_64_TPOFF64 *ABS*+0x70
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 64 48 8b 11[ ]+mov %fs:\(%rcx\),%rdx
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: c9[ ]+leaveq *
+[0-9a-f]+: c3[ ]+retq *
+[0-9a-f]+: 90[ ]+nop *