diff options
Diffstat (limited to 'ld/testsuite/ld-i386')
26 files changed, 250 insertions, 240 deletions
diff --git a/ld/testsuite/ld-i386/alloc.d b/ld/testsuite/ld-i386/alloc.d new file mode 100644 index 000000000000..c2b22f2e0046 --- /dev/null +++ b/ld/testsuite/ld-i386/alloc.d @@ -0,0 +1,4 @@ +#name: Invalid allocated section +#as: --32 +#ld: -melf_i386 -T alloc.t +#error: .*section `.foo' can't be allocated in segment 0.* diff --git a/ld/testsuite/ld-i386/alloc.s b/ld/testsuite/ld-i386/alloc.s new file mode 100644 index 000000000000..8c4f8fa1961c --- /dev/null +++ b/ld/testsuite/ld-i386/alloc.s @@ -0,0 +1,6 @@ +	.section .bar,"ax","progbits" +	.byte 0 +	.section .foo,"aw","progbits" +	.byte 0 +	.bss +	.long 0 diff --git a/ld/testsuite/ld-i386/alloc.t b/ld/testsuite/ld-i386/alloc.t new file mode 100644 index 000000000000..ea7f48c5b004 --- /dev/null +++ b/ld/testsuite/ld-i386/alloc.t @@ -0,0 +1,13 @@ +OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") +OUTPUT_ARCH(i386) +PHDRS { + text PT_LOAD FLAGS(5); /* R_E */ +} +SECTIONS +{ +  . = 0xC0000000 + ((0x100000 + (0x100000 - 1)) & ~(0x100000 - 1)); +  .bar : AT(ADDR(.bar) - 0xC0000000) { *(.bar) } :text +  .bss : AT(ADDR(.bss) - 0xC0000000) { *(.bss) } +  .foo 0 : AT(ADDR(.bss) + SIZEOF(.bss) - 0xC0000000) { *(.foo) } :text +  /DISCARD/ : { *(.*) } +} diff --git a/ld/testsuite/ld-i386/combreloc.d b/ld/testsuite/ld-i386/combreloc.d index a6f482d9c2f7..bbe91341b5ab 100644 --- a/ld/testsuite/ld-i386/combreloc.d +++ b/ld/testsuite/ld-i386/combreloc.d @@ -4,7 +4,6 @@  #as: --32  #ld: -shared -melf_i386 -z combreloc  #readelf: -r -#target: i?86-*-*  Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 4 entries:   Offset     Info    Type            Sym.Value  Sym. Name diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp index ad8a6106761e..989d392f185d 100644 --- a/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp @@ -24,7 +24,7 @@ if {[istarget "i?86-*-vxworks"]} {  	{"VxWorks shared library test 1" "-shared -Tvxworks1.ld"  	 "" {vxworks1-lib.s}  	 {{readelf --relocs vxworks1-lib.rd} {objdump -dr vxworks1-lib.dd} -	  {readelf --symbols vxworks1-lib.nd}} +	  {readelf --symbols vxworks1-lib.nd} {readelf -d vxworks1-lib.td}}  	 "libvxworks1.so"}  	{"VxWorks executable test 1 (dynamic)" \  	 "tmpdir/libvxworks1.so -Tvxworks1.ld -q --force-dynamic" @@ -113,3 +113,6 @@ run_ld_link_tests $i386tests  run_dump_test "abs"  run_dump_test "pcrel8"  run_dump_test "pcrel16" +run_dump_test "pcrel16abs" +run_dump_test "alloc" +run_dump_test "warn1" diff --git a/ld/testsuite/ld-i386/pcrel16abs.d b/ld/testsuite/ld-i386/pcrel16abs.d new file mode 100644 index 000000000000..f4bfca561a1c --- /dev/null +++ b/ld/testsuite/ld-i386/pcrel16abs.d @@ -0,0 +1,12 @@ +#name: PCREL16 absolute reloc +#as: --32 +#ld: -melf_i386 -Ttext 0xfffffff0 +#objdump: -drj.text -m i8086 + +.*: +file format elf32-i386 + +Disassembly of section .text: + +f+0 <_start>: +f+0:	e9 0d e0[ 	]+jmp[ 	]+ffffe000 <SEGMENT_SIZE\+0xfffee000> +#pass diff --git a/ld/testsuite/ld-i386/pcrel16abs.s b/ld/testsuite/ld-i386/pcrel16abs.s new file mode 100644 index 000000000000..4bf68a7ddc13 --- /dev/null +++ b/ld/testsuite/ld-i386/pcrel16abs.s @@ -0,0 +1,6 @@ +SEGMENT_SIZE = 0x10000 +RVECTOR = 0x00010 +.code16 + .globl _start +_start: + jmp SEGMENT_SIZE-(0x1f00 +0xf0 +RVECTOR) diff --git a/ld/testsuite/ld-i386/reloc.d b/ld/testsuite/ld-i386/reloc.d index 9e8faa419cae..e559e53f4ed1 100644 --- a/ld/testsuite/ld-i386/reloc.d +++ b/ld/testsuite/ld-i386/reloc.d @@ -4,7 +4,6 @@  #as: --32  #ld: -shared -melf_i386 -z nocombreloc  #objdump: -hw -#target: i?86-*-*  .*: +file format elf32-i386  #... diff --git a/ld/testsuite/ld-i386/tlsbin.dd b/ld/testsuite/ld-i386/tlsbin.dd index 08a1f3143f58..0e3ef4d9484b 100644 --- a/ld/testsuite/ld-i386/tlsbin.dd +++ b/ld/testsuite/ld-i386/tlsbin.dd @@ -32,7 +32,7 @@ Disassembly of section .text:   8049014:	90[ 	]+nop *  #  GD -> IE because variable is not defined in executable   8049015:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax - 804901b:	2b 83 f8 ff ff ff[ 	]+sub    0xfffffff8\(%ebx\),%eax + 804901b:	2b 83 f8 ff ff ff[ 	]+sub    -0x8\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	sG1   8049021:	90[ 	]+nop *   8049022:	90[ 	]+nop * @@ -41,7 +41,7 @@ Disassembly of section .text:  #  GD -> IE because variable is not defined in executable where  #  the variable is referenced through @gottpoff too   8049025:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax - 804902b:	2b 83 e8 ff ff ff[ 	]+sub    0xffffffe8\(%ebx\),%eax + 804902b:	2b 83 e8 ff ff ff[ 	]+sub    -0x18\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	sG2   8049031:	90[ 	]+nop *   8049032:	90[ 	]+nop * @@ -50,7 +50,7 @@ Disassembly of section .text:  #  GD -> IE because variable is not defined in executable where  #  the variable is referenced through @gotntpoff too   8049035:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax - 804903b:	2b 83 dc ff ff ff[ 	]+sub    0xffffffdc\(%ebx\),%eax + 804903b:	03 83 dc ff ff ff[ 	]+add    -0x24\(%ebx\),%eax  #				->R_386_TLS_TPOFF	sG3   8049041:	90[ 	]+nop *   8049042:	90[ 	]+nop * @@ -59,7 +59,7 @@ Disassembly of section .text:  #  GD -> IE because variable is not defined in executable where  #  the variable is referenced through @gottpoff and @gotntpoff too   8049045:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax - 804904b:	2b 83 ec ff ff ff[ 	]+sub    0xffffffec\(%ebx\),%eax + 804904b:	2b 83 ec ff ff ff[ 	]+sub    -0x14\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	sG4   8049051:	90[ 	]+nop *   8049052:	90[ 	]+nop * @@ -95,11 +95,11 @@ Disassembly of section .text:   804908c:	8d 74 26 00[ 	]+lea    0x0\(%esi\),%esi   8049090:	90[ 	]+nop *   8049091:	90[ 	]+nop * - 8049092:	8d 90 20 f0 ff ff[ 	]+lea    0xfffff020\(%eax\),%edx + 8049092:	8d 90 20 f0 ff ff[ 	]+lea    -0xfe0\(%eax\),%edx  #							sl1   8049098:	90[ 	]+nop *   8049099:	90[ 	]+nop * - 804909a:	8d 88 24 f0 ff ff[ 	]+lea    0xfffff024\(%eax\),%ecx + 804909a:	8d 88 24 f0 ff ff[ 	]+lea    -0xfdc\(%eax\),%ecx  #							sl2   80490a0:	90[ 	]+nop *   80490a1:	90[ 	]+nop * @@ -111,11 +111,11 @@ Disassembly of section .text:   80490ab:	8d 74 26 00[ 	]+lea    0x0\(%esi\),%esi   80490af:	90[ 	]+nop *   80490b0:	90[ 	]+nop * - 80490b1:	8d 90 40 f0 ff ff[ 	]+lea    0xfffff040\(%eax\),%edx + 80490b1:	8d 90 40 f0 ff ff[ 	]+lea    -0xfc0\(%eax\),%edx  #							sh1   80490b7:	90[ 	]+nop *   80490b8:	90[ 	]+nop * - 80490b9:	8d 88 44 f0 ff ff[ 	]+lea    0xfffff044\(%eax\),%ecx + 80490b9:	8d 88 44 f0 ff ff[ 	]+lea    -0xfbc\(%eax\),%ecx  #							sh2   80490bf:	90[ 	]+nop *   80490c0:	90[ 	]+nop * @@ -125,7 +125,7 @@ Disassembly of section .text:   80490c3:	65 8b 0d 00 00 00 00[ 	]+mov    %gs:0x0,%ecx   80490ca:	90[ 	]+nop *   80490cb:	90[ 	]+nop * - 80490cc:	2b 8b e8 ff ff ff[ 	]+sub    0xffffffe8\(%ebx\),%ecx + 80490cc:	2b 8b e8 ff ff ff[ 	]+sub    -0x18\(%ebx\),%ecx  #				->R_386_TLS_TPOFF32	sG2   80490d2:	90[ 	]+nop *   80490d3:	90[ 	]+nop * @@ -135,7 +135,7 @@ Disassembly of section .text:   80490d6:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax   80490dc:	90[ 	]+nop *   80490dd:	90[ 	]+nop * - 80490de:	2b 83 ec ff ff ff[ 	]+sub    0xffffffec\(%ebx\),%eax + 80490de:	2b 83 ec ff ff ff[ 	]+sub    -0x14\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	sG4   80490e4:	90[ 	]+nop *   80490e5:	90[ 	]+nop * @@ -145,7 +145,7 @@ Disassembly of section .text:   80490e8:	65 8b 0d 00 00 00 00[ 	]+mov    %gs:0x0,%ecx   80490ef:	90[ 	]+nop *   80490f0:	90[ 	]+nop * - 80490f1:	03 8b dc ff ff ff[ 	]+add    0xffffffdc\(%ebx\),%ecx + 80490f1:	03 8b dc ff ff ff[ 	]+add    -0x24\(%ebx\),%ecx  #				->R_386_TLS_TPOFF	sG3   80490f7:	90[ 	]+nop *   80490f8:	90[ 	]+nop * @@ -155,7 +155,7 @@ Disassembly of section .text:   80490fb:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax   8049101:	90[ 	]+nop *   8049102:	90[ 	]+nop * - 8049103:	03 83 f0 ff ff ff[ 	]+add    0xfffffff0\(%ebx\),%eax + 8049103:	03 83 f0 ff ff ff[ 	]+add    -0x10\(%ebx\),%eax  #				->R_386_TLS_TPOFF	sG4   8049109:	90[ 	]+nop *   804910a:	90[ 	]+nop * @@ -193,7 +193,7 @@ Disassembly of section .text:   8049145:	90[ 	]+nop *  #  Direct access through %gs  #  @gotntpoff IE against global var - 8049146:	8b 8b e0 ff ff ff[ 	]+mov    0xffffffe0\(%ebx\),%ecx + 8049146:	8b 8b e0 ff ff ff[ 	]+mov    -0x20\(%ebx\),%ecx  #				->R_386_TLS_TPOFF	sG5   804914c:	90[ 	]+nop *   804914d:	90[ 	]+nop * @@ -222,7 +222,7 @@ Disassembly of section .text:   8049170:	90[ 	]+nop *   8049171:	90[ 	]+nop *   8049172:	90[ 	]+nop * - 8049173:	8b 5d fc[ 	]+mov    0xfffffffc\(%ebp\),%ebx + 8049173:	8b 5d fc[ 	]+mov    -0x4\(%ebp\),%ebx   8049176:	c9[ 	]+leave *   8049177:	c3[ 	]+ret * @@ -240,7 +240,7 @@ Disassembly of section .text:   804918b:	65 8b 15 00 00 00 00[ 	]+mov    %gs:0x0,%edx   8049192:	90[ 	]+nop *   8049193:	90[ 	]+nop * - 8049194:	2b 91 f4 ff ff ff[ 	]+sub    0xfffffff4\(%ecx\),%edx + 8049194:	2b 91 f4 ff ff ff[ 	]+sub    -0xc\(%ecx\),%edx  #				->R_386_TLS_TPOFF32	sG6   804919a:	90[ 	]+nop *   804919b:	90[ 	]+nop * @@ -401,7 +401,7 @@ Disassembly of section .text:   804929c:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax   80492a2:	90[ 	]+nop *   80492a3:	90[ 	]+nop * - 80492a4:	8d 90 04 f0 ff ff[ 	]+lea    0xfffff004\(%eax\),%edx + 80492a4:	8d 90 04 f0 ff ff[ 	]+lea    -0xffc\(%eax\),%edx  #							sg2   80492aa:	90[ 	]+nop *   80492ab:	90[ 	]+nop * @@ -451,6 +451,6 @@ Disassembly of section .text:   80492f4:	90[ 	]+nop *   80492f5:	90[ 	]+nop *   80492f6:	90[ 	]+nop * - 80492f7:	8b 5d fc[ 	]+mov    0xfffffffc\(%ebp\),%ebx + 80492f7:	8b 5d fc[ 	]+mov    -0x4\(%ebp\),%ebx   80492fa:	c9[ 	]+leave *   80492fb:	c3[ 	]+ret * diff --git a/ld/testsuite/ld-i386/tlsbin.rd b/ld/testsuite/ld-i386/tlsbin.rd index b48562608404..54abd8bdbf6f 100644 --- a/ld/testsuite/ld-i386/tlsbin.rd +++ b/ld/testsuite/ld-i386/tlsbin.rd @@ -70,7 +70,7 @@ Relocation section '.rel.plt' at offset 0x[0-9a-f]+ contains 1 entries:   Offset +Info +Type +Sym.Value  Sym. Name  [0-9a-f ]+R_386_JUMP_SLOT +[0-9a-f]+ +___tls_get_addr -Symbol table '.dynsym' contains 13 entries: +Symbol table '.dynsym' contains [0-9]+ entries:   +Num: +Value  Size Type +Bind +Vis +Ndx Name   +[0-9]+: 0+ +0 NOTYPE  LOCAL  DEFAULT  UND *   +[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT  UND sG3 @@ -86,7 +86,7 @@ Symbol table '.dynsym' contains 13 entries:   +[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT  UND sG8   +[0-9]+: [0-9a-f]+ +0 FUNC +GLOBAL DEFAULT  UND ___tls_get_addr -Symbol table '.symtab' contains 73 entries: +Symbol table '.symtab' contains 70 entries:   +Num: +Value  Size Type +Bind +Vis +Ndx Name   +[0-9]+: 0+ +0 NOTYPE  LOCAL  DEFAULT  UND *   +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +1 * @@ -102,9 +102,6 @@ Symbol table '.symtab' contains 73 entries:   +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +11 *   +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +12 *   +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +13 * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +14 * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +15 * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +16 *   +[0-9]+: 00000020 +0 TLS +LOCAL  DEFAULT +9 sl1   +[0-9]+: 00000024 +0 TLS +LOCAL  DEFAULT +9 sl2   +[0-9]+: 00000028 +0 TLS +LOCAL  DEFAULT +9 sl3 diff --git a/ld/testsuite/ld-i386/tlsbindesc.dd b/ld/testsuite/ld-i386/tlsbindesc.dd index 071a5b320427..00e164f3e297 100644 --- a/ld/testsuite/ld-i386/tlsbindesc.dd +++ b/ld/testsuite/ld-i386/tlsbindesc.dd @@ -31,7 +31,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE because variable is not defined in executable - [0-9a-f]+:	8b 83 f8 ff ff ff[ 	]+mov    0xfffffff8\(%ebx\),%eax + [0-9a-f]+:	8b 83 f8 ff ff ff[ 	]+mov    -0x8\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	sG1   [0-9a-f]+:	f7 d8[ 	]+neg    %eax   [0-9a-f]+:	90[ 	]+nop * @@ -40,7 +40,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE because variable is not defined in executable where  #  the variable is referenced through @gottpoff too - [0-9a-f]+:	8b 83 e8 ff ff ff[ 	]+mov    0xffffffe8\(%ebx\),%eax + [0-9a-f]+:	8b 83 e8 ff ff ff[ 	]+mov    -0x18\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	sG2   [0-9a-f]+:	f7 d8[ 	]+neg    %eax   [0-9a-f]+:	90[ 	]+nop * @@ -49,20 +49,18 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE because variable is not defined in executable where  #  the variable is referenced through @gotntpoff too - [0-9a-f]+:	8b 83 dc ff ff ff[ 	]+mov    0xffffffdc\(%ebx\),%eax + [0-9a-f]+:	8b 83 dc ff ff ff[ 	]+mov    -0x24\(%ebx\),%eax  #				->R_386_TLS_TPOFF	sG3 - [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	90[ 	]+nop * + [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 -> IE because variable is not defined in executable where  #  the variable is referenced through @gottpoff and @gotntpoff too - [0-9a-f]+:	8b 83 f0 ff ff ff[ 	]+mov    0xfffffff0\(%ebx\),%eax + [0-9a-f]+:	8b 83 f0 ff ff ff[ 	]+mov    -0x10\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	sG4 - [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	90[ 	]+nop * + [0-9a-f]+:	66 90[ 	]+xchg   %ax,%ax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -70,8 +68,7 @@ Disassembly of section .text:  #  GD -> LE with global variable defined in executable   [0-9a-f]+:	8d 05 00 f0 ff ff[ 	]+lea    0xfffff000,%eax  #							sg1 - [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	90[ 	]+nop * + [0-9a-f]+:	66 90[ 	]+xchg   %ax,%ax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -79,8 +76,7 @@ Disassembly of section .text:  #  GD -> LE with local variable defined in executable   [0-9a-f]+:	8d 05 20 f0 ff ff[ 	]+lea    0xfffff020,%eax  #							sl1 - [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	90[ 	]+nop * + [0-9a-f]+:	66 90[ 	]+xchg   %ax,%ax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -88,23 +84,21 @@ Disassembly of section .text:  #  GD -> LE with hidden variable defined in executable   [0-9a-f]+:	8d 05 40 f0 ff ff[ 	]+lea    0xfffff040,%eax  #							sh1 - [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	90[ 	]+nop * + [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 -> LE   [0-9a-f]+:	8d 05 00 f0 ff ff[ 	]+lea    0xfffff000,%eax + [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 * - [0-9a-f]+:	8d 90 20 f0 ff ff[ 	]+lea    0xfffff020\(%eax\),%edx + [0-9a-f]+:	8d 90 20 f0 ff ff[ 	]+lea    -0xfe0\(%eax\),%edx  #							sl1   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	8d 88 24 f0 ff ff[ 	]+lea    0xfffff024\(%eax\),%ecx + [0-9a-f]+:	8d 88 24 f0 ff ff[ 	]+lea    -0xfdc\(%eax\),%ecx  #							sl2   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -112,15 +106,14 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *  #  LD -> LE against hidden variables   [0-9a-f]+:	8d 05 00 f0 ff ff[ 	]+lea    0xfffff000,%eax + [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 * - [0-9a-f]+:	8d 90 40 f0 ff ff[ 	]+lea    0xfffff040\(%eax\),%edx + [0-9a-f]+:	8d 90 40 f0 ff ff[ 	]+lea    -0xfc0\(%eax\),%edx  #							sh1   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	8d 88 44 f0 ff ff[ 	]+lea    0xfffff044\(%eax\),%ecx + [0-9a-f]+:	8d 88 44 f0 ff ff[ 	]+lea    -0xfbc\(%eax\),%ecx  #							sh2   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -130,7 +123,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 8b 0d 00 00 00 00[ 	]+mov    %gs:0x0,%ecx   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	2b 8b e8 ff ff ff[ 	]+sub    0xffffffe8\(%ebx\),%ecx + [0-9a-f]+:	2b 8b e8 ff ff ff[ 	]+sub    -0x18\(%ebx\),%ecx  #				->R_386_TLS_TPOFF32	sG2   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -140,7 +133,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	2b 83 ec ff ff ff[ 	]+sub    0xffffffec\(%ebx\),%eax + [0-9a-f]+:	2b 83 ec ff ff ff[ 	]+sub    -0x14\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	sG4   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -150,7 +143,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 8b 0d 00 00 00 00[ 	]+mov    %gs:0x0,%ecx   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	03 8b dc ff ff ff[ 	]+add    0xffffffdc\(%ebx\),%ecx + [0-9a-f]+:	03 8b dc ff ff ff[ 	]+add    -0x24\(%ebx\),%ecx  #				->R_386_TLS_TPOFF	sG3   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -160,7 +153,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	03 83 f0 ff ff ff[ 	]+add    0xfffffff0\(%ebx\),%eax + [0-9a-f]+:	03 83 f0 ff ff ff[ 	]+add    -0x10\(%ebx\),%eax  #				->R_386_TLS_TPOFF	sG4   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -198,7 +191,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *  #  Direct access through %gs  #  @gotntpoff IE against global var - [0-9a-f]+:	8b 8b e0 ff ff ff[ 	]+mov    0xffffffe0\(%ebx\),%ecx + [0-9a-f]+:	8b 8b e0 ff ff ff[ 	]+mov    -0x20\(%ebx\),%ecx  #				->R_386_TLS_TPOFF	sG5   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -227,7 +220,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	8b 5d fc[ 	]+mov    0xfffffffc\(%ebp\),%ebx + [0-9a-f]+:	8b 5d fc[ 	]+mov    -0x4\(%ebp\),%ebx   [0-9a-f]+:	c9[ 	]+leave *   [0-9a-f]+:	c3[ 	]+ret *   [0-9a-f]+:	90[ 	]+nop * @@ -247,7 +240,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 8b 15 00 00 00 00[ 	]+mov    %gs:0x0,%edx   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	2b 91 f4 ff ff ff[ 	]+sub    0xfffffff4\(%ecx\),%edx + [0-9a-f]+:	2b 91 f4 ff ff ff[ 	]+sub    -0xc\(%ecx\),%edx  #				->R_386_TLS_TPOFF32	sG6   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -408,7 +401,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	8d 90 04 f0 ff ff[ 	]+lea    0xfffff004\(%eax\),%edx + [0-9a-f]+:	8d 90 04 f0 ff ff[ 	]+lea    -0xffc\(%eax\),%edx  #							sg2   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -458,6 +451,6 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	8b 5d fc[ 	]+mov    0xfffffffc\(%ebp\),%ebx + [0-9a-f]+:	8b 5d fc[ 	]+mov    -0x4\(%ebp\),%ebx   [0-9a-f]+:	c9[ 	]+leave *   [0-9a-f]+:	c3[ 	]+ret * diff --git a/ld/testsuite/ld-i386/tlsbindesc.rd b/ld/testsuite/ld-i386/tlsbindesc.rd index 27d0670c9934..65b47a2181b1 100644 --- a/ld/testsuite/ld-i386/tlsbindesc.rd +++ b/ld/testsuite/ld-i386/tlsbindesc.rd @@ -64,7 +64,7 @@ Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 9 entries:  0+804a0fc  00000825 R_386_TLS_TPOFF32 0+ +sG1  0+804a100  00000b0e R_386_TLS_TPOFF +0+ +sG8 -Symbol table '.dynsym' contains 12 entries: +Symbol table '.dynsym' contains [0-9]+ entries:   +Num: +Value  Size Type +Bind +Vis +Ndx Name   +[0-9]+: 0+ +0 NOTYPE  LOCAL  DEFAULT  UND *   +[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT  UND sG3 @@ -79,7 +79,7 @@ Symbol table '.dynsym' contains 12 entries:   +[0-9]+: [0-9a-f]+ +0 NOTYPE  GLOBAL DEFAULT  ABS _end   +[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT  UND sG8 -Symbol table '.symtab' contains 71 entries: +Symbol table '.symtab' contains 68 entries:   +Num: +Value  Size Type +Bind +Vis +Ndx Name   +[0-9]+: 0+ +0 NOTYPE  LOCAL  DEFAULT  UND *   +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +1 * @@ -93,9 +93,6 @@ Symbol table '.symtab' contains 71 entries:   +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +9 *   +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +10 *   +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +11 * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +12 * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +13 * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +14 *   +[0-9]+: 00000020 +0 TLS +LOCAL  DEFAULT +7 sl1   +[0-9]+: 00000024 +0 TLS +LOCAL  DEFAULT +7 sl2   +[0-9]+: 00000028 +0 TLS +LOCAL  DEFAULT +7 sl3 diff --git a/ld/testsuite/ld-i386/tlsdesc.dd b/ld/testsuite/ld-i386/tlsdesc.dd index 666f790cc235..bca00901b97e 100644 --- a/ld/testsuite/ld-i386/tlsdesc.dd +++ b/ld/testsuite/ld-i386/tlsdesc.dd @@ -30,7 +30,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE because variable is referenced through @gottpoff too - [0-9a-f]+:	8b 83 f8 ff ff ff[ 	]+mov    0xfffffff8\(%ebx\),%eax + [0-9a-f]+:	8b 83 f8 ff ff ff[ 	]+mov    -0x8\(%ebx\),%eax  #				->R_386_TLS_TPOFF	sg2   [0-9a-f]+:	f7 d8[ 	]+neg    %eax   [0-9a-f]+:	90[ 	]+nop * @@ -38,19 +38,17 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE because variable is referenced through @gotntpoff too - [0-9a-f]+:	8b 83 c4 ff ff ff[ 	]+mov    0xffffffc4\(%ebx\),%eax + [0-9a-f]+:	8b 83 c4 ff ff ff[ 	]+mov    -0x3c\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	sg3 - [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	90[ 	]+nop * + [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 -> IE because variable is referenced through @gottpoff and - [0-9a-f]+:	8b 83 d4 ff ff ff[ 	]+mov    0xffffffd4\(%ebx\),%eax + [0-9a-f]+:	8b 83 d4 ff ff ff[ 	]+mov    -0x2c\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	sg4 - [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	90[ 	]+nop * + [0-9a-f]+:	66 90[ 	]+xchg   %ax,%ax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -64,7 +62,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE against local variable referenced through @gottpoff too - [0-9a-f]+:	8b 83 b0 ff ff ff[ 	]+mov    0xffffffb0\(%ebx\),%eax + [0-9a-f]+:	8b 83 b0 ff ff ff[ 	]+mov    -0x50\(%ebx\),%eax  #				->R_386_TLS_TPOFF	sl2   [0-9a-f]+:	f7 d8[ 	]+neg    %eax   [0-9a-f]+:	90[ 	]+nop * @@ -72,19 +70,17 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE against local variable referenced through @gotntpoff - [0-9a-f]+:	8b 83 b4 ff ff ff[ 	]+mov    0xffffffb4\(%ebx\),%eax + [0-9a-f]+:	8b 83 b4 ff ff ff[ 	]+mov    -0x4c\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	sl3 - [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	90[ 	]+nop * + [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 -> IE against local variable referenced through @gottpoff and - [0-9a-f]+:	8b 83 bc ff ff ff[ 	]+mov    0xffffffbc\(%ebx\),%eax + [0-9a-f]+:	8b 83 bc ff ff ff[ 	]+mov    -0x44\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	sl4 - [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	90[ 	]+nop * + [0-9a-f]+:	66 90[ 	]+xchg   %ax,%ax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -98,7 +94,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE against hidden and local variable referenced through @gottpoff too - [0-9a-f]+:	8b 83 fc ff ff ff[ 	]+mov    0xfffffffc\(%ebx\),%eax + [0-9a-f]+:	8b 83 fc ff ff ff[ 	]+mov    -0x4\(%ebx\),%eax  #				->R_386_TLS_TPOFF	sh2   [0-9a-f]+:	f7 d8[ 	]+neg    %eax   [0-9a-f]+:	90[ 	]+nop * @@ -106,19 +102,17 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE against hidden and local variable referenced through @gotntpoff too - [0-9a-f]+:	8b 83 c8 ff ff ff[ 	]+mov    0xffffffc8\(%ebx\),%eax + [0-9a-f]+:	8b 83 c8 ff ff ff[ 	]+mov    -0x38\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	sh3 - [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	90[ 	]+nop * + [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 -> IE against hidden and local variable referenced through @gottpoff and @gotntpoff too - [0-9a-f]+:	8b 83 e8 ff ff ff[ 	]+mov    0xffffffe8\(%ebx\),%eax + [0-9a-f]+:	8b 83 e8 ff ff ff[ 	]+mov    -0x18\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	sh4 - [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	90[ 	]+nop * + [0-9a-f]+:	66 90[ 	]+xchg   %ax,%ax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -132,7 +126,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE against hidden but not local variable referenced through - [0-9a-f]+:	8b 83 cc ff ff ff[ 	]+mov    0xffffffcc\(%ebx\),%eax + [0-9a-f]+:	8b 83 cc ff ff ff[ 	]+mov    -0x34\(%ebx\),%eax  #				->R_386_TLS_TPOFF	sH2   [0-9a-f]+:	f7 d8[ 	]+neg    %eax   [0-9a-f]+:	90[ 	]+nop * @@ -140,19 +134,17 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE against hidden but not local variable referenced through - [0-9a-f]+:	8b 83 ec ff ff ff[ 	]+mov    0xffffffec\(%ebx\),%eax + [0-9a-f]+:	8b 83 ec ff ff ff[ 	]+mov    -0x14\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	sH3 - [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	90[ 	]+nop * + [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 -> IE against hidden but not local variable referenced through - [0-9a-f]+:	8b 83 e0 ff ff ff[ 	]+mov    0xffffffe0\(%ebx\),%eax + [0-9a-f]+:	8b 83 e0 ff ff ff[ 	]+mov    -0x20\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	sH4 - [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	90[ 	]+nop * + [0-9a-f]+:	66 90[ 	]+xchg   %ax,%ax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -197,7 +189,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 8b 0d 00 00 00 00[ 	]+mov    %gs:0x0,%ecx   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	2b 8b f8 ff ff ff[ 	]+sub    0xfffffff8\(%ebx\),%ecx + [0-9a-f]+:	2b 8b f8 ff ff ff[ 	]+sub    -0x8\(%ebx\),%ecx  #				->R_386_TLS_TPOFF32	sg2   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -207,7 +199,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	2b 83 d0 ff ff ff[ 	]+sub    0xffffffd0\(%ebx\),%eax + [0-9a-f]+:	2b 83 d0 ff ff ff[ 	]+sub    -0x30\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	sg4   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -217,7 +209,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 8b 0d 00 00 00 00[ 	]+mov    %gs:0x0,%ecx   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	03 8b c4 ff ff ff[ 	]+add    0xffffffc4\(%ebx\),%ecx + [0-9a-f]+:	03 8b c4 ff ff ff[ 	]+add    -0x3c\(%ebx\),%ecx  #				->R_386_TLS_TPOFF	sg3   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -227,7 +219,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	03 83 d4 ff ff ff[ 	]+add    0xffffffd4\(%ebx\),%eax + [0-9a-f]+:	03 83 d4 ff ff ff[ 	]+add    -0x2c\(%ebx\),%eax  #				->R_386_TLS_TPOFF	sg4   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -237,7 +229,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 8b 0d 00 00 00 00[ 	]+mov    %gs:0x0,%ecx   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	2b 8b b0 ff ff ff[ 	]+sub    0xffffffb0\(%ebx\),%ecx + [0-9a-f]+:	2b 8b b0 ff ff ff[ 	]+sub    -0x50\(%ebx\),%ecx  #				->R_386_TLS_TPOFF32	[0xdcffffff]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -247,7 +239,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	2b 83 b8 ff ff ff[ 	]+sub    0xffffffb8\(%ebx\),%eax + [0-9a-f]+:	2b 83 b8 ff ff ff[ 	]+sub    -0x48\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	[0xd4ffffff]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -257,7 +249,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 8b 0d 00 00 00 00[ 	]+mov    %gs:0x0,%ecx   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	03 8b b4 ff ff ff[ 	]+add    0xffffffb4\(%ebx\),%ecx + [0-9a-f]+:	03 8b b4 ff ff ff[ 	]+add    -0x4c\(%ebx\),%ecx  #				->R_386_TLS_TPOFF	[0x28000000]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -267,7 +259,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	03 83 bc ff ff ff[ 	]+add    0xffffffbc\(%ebx\),%eax + [0-9a-f]+:	03 83 bc ff ff ff[ 	]+add    -0x44\(%ebx\),%eax  #				->R_386_TLS_TPOFF	[0x2c000000]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -277,7 +269,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 8b 0d 00 00 00 00[ 	]+mov    %gs:0x0,%ecx   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	2b 8b fc ff ff ff[ 	]+sub    0xfffffffc\(%ebx\),%ecx + [0-9a-f]+:	2b 8b fc ff ff ff[ 	]+sub    -0x4\(%ebx\),%ecx  #				->R_386_TLS_TPOFF32	[0xbcffffff]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -287,7 +279,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	2b 83 e4 ff ff ff[ 	]+sub    0xffffffe4\(%ebx\),%eax + [0-9a-f]+:	2b 83 e4 ff ff ff[ 	]+sub    -0x1c\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	[0xb4ffffff]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -297,7 +289,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 8b 0d 00 00 00 00[ 	]+mov    %gs:0x0,%ecx   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	03 8b c8 ff ff ff[ 	]+add    0xffffffc8\(%ebx\),%ecx + [0-9a-f]+:	03 8b c8 ff ff ff[ 	]+add    -0x38\(%ebx\),%ecx  #				->R_386_TLS_TPOFF	[0x48000000]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -307,7 +299,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	03 83 e8 ff ff ff[ 	]+add    0xffffffe8\(%ebx\),%eax + [0-9a-f]+:	03 83 e8 ff ff ff[ 	]+add    -0x18\(%ebx\),%eax  #				->R_386_TLS_TPOFF	[0x4c000000]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -317,7 +309,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 8b 0d 00 00 00 00[ 	]+mov    %gs:0x0,%ecx   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	2b 8b cc ff ff ff[ 	]+sub    0xffffffcc\(%ebx\),%ecx + [0-9a-f]+:	2b 8b cc ff ff ff[ 	]+sub    -0x34\(%ebx\),%ecx  #				->R_386_TLS_TPOFF32	[0x9cffffff]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -327,7 +319,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	2b 83 dc ff ff ff[ 	]+sub    0xffffffdc\(%ebx\),%eax + [0-9a-f]+:	2b 83 dc ff ff ff[ 	]+sub    -0x24\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	[0x94ffffff]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -337,7 +329,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 8b 0d 00 00 00 00[ 	]+mov    %gs:0x0,%ecx   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	03 8b ec ff ff ff[ 	]+add    0xffffffec\(%ebx\),%ecx + [0-9a-f]+:	03 8b ec ff ff ff[ 	]+add    -0x14\(%ebx\),%ecx  #				->R_386_TLS_TPOFF	[0x68000000]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -347,7 +339,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	03 83 e0 ff ff ff[ 	]+add    0xffffffe0\(%ebx\),%eax + [0-9a-f]+:	03 83 e0 ff ff ff[ 	]+add    -0x20\(%ebx\),%eax  #				->R_386_TLS_TPOFF	[0x6c000000]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -355,7 +347,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *  #  Direct access through %gs  #  @gotntpoff IE against global var - [0-9a-f]+:	8b 8b d8 ff ff ff[ 	]+mov    0xffffffd8\(%ebx\),%ecx + [0-9a-f]+:	8b 8b d8 ff ff ff[ 	]+mov    -0x28\(%ebx\),%ecx  #				->R_386_TLS_TPOFF	sg5   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -365,7 +357,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *  #  @gotntpoff IE against local var - [0-9a-f]+:	8b 83 c0 ff ff ff[ 	]+mov    0xffffffc0\(%ebx\),%eax + [0-9a-f]+:	8b 83 c0 ff ff ff[ 	]+mov    -0x40\(%ebx\),%eax  #				->R_386_TLS_TPOFF	[0x30000000]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -375,7 +367,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *  #  @gotntpoff IE against hidden and local var - [0-9a-f]+:	8b 93 f0 ff ff ff[ 	]+mov    0xfffffff0\(%ebx\),%edx + [0-9a-f]+:	8b 93 f0 ff ff ff[ 	]+mov    -0x10\(%ebx\),%edx  #				->R_386_TLS_TPOFF	[0x50000000]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -385,7 +377,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *  #  @gotntpoff IE against hidden but not local var - [0-9a-f]+:	8b 8b f4 ff ff ff[ 	]+mov    0xfffffff4\(%ebx\),%ecx + [0-9a-f]+:	8b 8b f4 ff ff ff[ 	]+mov    -0xc\(%ebx\),%ecx  #				->R_386_TLS_TPOFF	[0x70000000]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -394,6 +386,6 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	8b 5d fc[ 	]+mov    0xfffffffc\(%ebp\),%ebx + [0-9a-f]+:	8b 5d fc[ 	]+mov    -0x4\(%ebp\),%ebx   [0-9a-f]+:	c9[ 	]+leave *   [0-9a-f]+:	c3[ 	]+ret * diff --git a/ld/testsuite/ld-i386/tlsdesc.rd b/ld/testsuite/ld-i386/tlsdesc.rd index 12fd5d4236bd..aca162cdebaf 100644 --- a/ld/testsuite/ld-i386/tlsdesc.rd +++ b/ld/testsuite/ld-i386/tlsdesc.rd @@ -49,41 +49,38 @@ Program Headers:  Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 20 entries:   Offset +Info +Type +Sym.Value +Sym. Name -[0-9a-f]+ +0+25 R_386_TLS_TPOFF32 -[0-9a-f]+ +0+0e R_386_TLS_TPOFF * -[0-9a-f]+ +0+25 R_386_TLS_TPOFF32 -[0-9a-f]+ +0+0e R_386_TLS_TPOFF * -[0-9a-f]+ +0+0e R_386_TLS_TPOFF * -[0-9a-f]+ +0+0e R_386_TLS_TPOFF * -[0-9a-f]+ +0+25 R_386_TLS_TPOFF32 -[0-9a-f]+ +0+25 R_386_TLS_TPOFF32 -[0-9a-f]+ +0+0e R_386_TLS_TPOFF * -[0-9a-f]+ +0+25 R_386_TLS_TPOFF32 -[0-9a-f]+ +0+0e R_386_TLS_TPOFF * -[0-9a-f]+ +0+0e R_386_TLS_TPOFF * -[0-9a-f]+ +0+0e R_386_TLS_TPOFF * -[0-9a-f]+ +0+0e R_386_TLS_TPOFF * -[0-9a-f]+ +0+25 R_386_TLS_TPOFF32 -[0-9a-f]+ +0+50e R_386_TLS_TPOFF   0+8   sg3 -[0-9a-f]+ +0+625 R_386_TLS_TPOFF32 0+c   sg4 -[0-9a-f]+ +0+60e R_386_TLS_TPOFF   0+c   sg4 -[0-9a-f]+ +0+70e R_386_TLS_TPOFF   0+10   sg5 -[0-9a-f]+ +0+b25 R_386_TLS_TPOFF32 0+4   sg2 +[0-9a-f ]+R_386_TLS_TPOFF32 +[0-9a-f ]+R_386_TLS_TPOFF * +[0-9a-f ]+R_386_TLS_TPOFF32 +[0-9a-f ]+R_386_TLS_TPOFF * +[0-9a-f ]+R_386_TLS_TPOFF * +[0-9a-f ]+R_386_TLS_TPOFF * +[0-9a-f ]+R_386_TLS_TPOFF32 +[0-9a-f ]+R_386_TLS_TPOFF32 +[0-9a-f ]+R_386_TLS_TPOFF * +[0-9a-f ]+R_386_TLS_TPOFF32 +[0-9a-f ]+R_386_TLS_TPOFF * +[0-9a-f ]+R_386_TLS_TPOFF * +[0-9a-f ]+R_386_TLS_TPOFF * +[0-9a-f ]+R_386_TLS_TPOFF * +[0-9a-f ]+R_386_TLS_TPOFF32 +[0-9a-f ]+R_386_TLS_TPOFF   0+8   sg3 +[0-9a-f ]+R_386_TLS_TPOFF32 0+c   sg4 +[0-9a-f ]+R_386_TLS_TPOFF   0+c   sg4 +[0-9a-f ]+R_386_TLS_TPOFF   0+10   sg5 +[0-9a-f ]+R_386_TLS_TPOFF32 0+4   sg2  Relocation section '.rel.plt' at offset 0x[0-9a-f]+ contains 5 entries:   Offset     Info    Type            Sym.Value  Sym. Name -[0-9a-f]+ +0+829 R_386_TLS_DESC * 0+   sg1 -[0-9a-f]+ +0+29 R_386_TLS_DESC * -[0-9a-f]+ +0+29 R_386_TLS_DESC * -[0-9a-f]+ +0+29 R_386_TLS_DESC * -[0-9a-f]+ +0+29 R_386_TLS_DESC * +[0-9a-f ]+R_386_TLS_DESC * 0+   sg1 +[0-9a-f ]+R_386_TLS_DESC * +[0-9a-f ]+R_386_TLS_DESC * +[0-9a-f ]+R_386_TLS_DESC * +[0-9a-f ]+R_386_TLS_DESC * -Symbol table '.dynsym' contains 16 entries: +Symbol table '.dynsym' contains [0-9]+ entries:   +Num: + Value  Size Type + Bind +Vis +Ndx Name   +[0-9]+: 0+ +0 NOTYPE  LOCAL  DEFAULT  UND * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +6 * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +7 * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +8 *   +[0-9]+: 0+1c +0 TLS +GLOBAL DEFAULT +7 sg8   +[0-9]+: 0+8 +0 TLS +GLOBAL DEFAULT +7 sg3   +[0-9]+: 0+c +0 TLS +GLOBAL DEFAULT +7 sg4 @@ -97,7 +94,7 @@ Symbol table '.dynsym' contains 16 entries:   +[0-9]+: [0-9a-f]+ +0 NOTYPE  GLOBAL DEFAULT  ABS _edata   +[0-9]+: [0-9a-f]+ +0 NOTYPE  GLOBAL DEFAULT  ABS _end -Symbol table '.symtab' contains 54 entries: +Symbol table '.symtab' contains 51 entries:   +Num: +Value  Size Type +Bind +Vis +Ndx Name   +[0-9]+: 0+ +0 NOTYPE  LOCAL  DEFAULT  UND *   +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +1 * @@ -111,9 +108,6 @@ Symbol table '.symtab' contains 54 entries:   +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +9 *   +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +10 *   +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +11 * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +12 * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +13 * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +14 *   +[0-9]+: 0+20 +0 TLS +LOCAL  DEFAULT +7 sl1   +[0-9]+: 0+24 +0 TLS +LOCAL  DEFAULT +7 sl2   +[0-9]+: 0+28 +0 TLS +LOCAL  DEFAULT +7 sl3 diff --git a/ld/testsuite/ld-i386/tlsdesc.sd b/ld/testsuite/ld-i386/tlsdesc.sd index 2af8c2d3df17..656c40971461 100644 --- a/ld/testsuite/ld-i386/tlsdesc.sd +++ b/ld/testsuite/ld-i386/tlsdesc.sd @@ -14,7 +14,7 @@ Contents of section \.got:   [0-9a-f]+ 6c000000 b4ffffff 4c000000 68000000  .*   [0-9a-f]+ 50000000 70000000 00000000 bcffffff  .*  Contents of section \.got\.plt: - [0-9a-f]+ ec150000 00000000 00000000 00000000  .* + [0-9a-f]+ b0150000 00000000 00000000 00000000  .*   [0-9a-f]+ 20000000 00000000 60000000 00000000  .*   [0-9a-f]+ 00000000 00000000 00000000 00000000  .*   [0-9a-f]+ 40000000 +.* diff --git a/ld/testsuite/ld-i386/tlsgdesc.dd b/ld/testsuite/ld-i386/tlsgdesc.dd index ca4092ea8438..25659de28339 100644 --- a/ld/testsuite/ld-i386/tlsgdesc.dd +++ b/ld/testsuite/ld-i386/tlsgdesc.dd @@ -24,7 +24,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 8b 0d 00 00 00 00[ 	]+mov    %gs:0x0,%ecx   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	2b 8b e0 ff ff ff[ 	]+sub    0xffffffe0\(%ebx\),%ecx + [0-9a-f]+:	2b 8b e0 ff ff ff[ 	]+sub    -0x20\(%ebx\),%ecx  #				->R_386_TLS_TPOFF32	sG3   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -34,14 +34,14 @@ Disassembly of section .text:   [0-9a-f]+:	65 8b 0d 00 00 00 00[ 	]+mov    %gs:0x0,%ecx   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	03 8b f0 ff ff ff[ 	]+add    0xfffffff0\(%ebx\),%ecx + [0-9a-f]+:	03 8b f0 ff ff ff[ 	]+add    -0x10\(%ebx\),%ecx  #				->R_386_TLS_TPOFF	sG4   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *  #  GD - [0-9a-f]+:	8d 04 1d f8 ff ff ff[ 	]+lea    0xfffffff8\(,%ebx,1\),%eax + [0-9a-f]+:	8d 04 1d f8 ff ff ff[ 	]+lea    -0x8\(,%ebx,1\),%eax  #				->R_386_TLS_DTPMOD32	sG1   [0-9a-f]+:	e8 a9 ff ff ff[ 	]+call   [0-9a-f]+ <___tls_get_addr@plt>  #				->R_386_JUMP_SLOT	___tls_get_addr @@ -63,7 +63,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	8d 04 1d e8 ff ff ff[ 	]+lea    0xffffffe8\(,%ebx,1\),%eax + [0-9a-f]+:	8d 04 1d e8 ff ff ff[ 	]+lea    -0x18\(,%ebx,1\),%eax  #				->R_386_TLS_DTPMOD32	sG2   [0-9a-f]+:	e8 81 ff ff ff[ 	]+call   [0-9a-f]+ <___tls_get_addr@plt>  #				->R_386_JUMP_SLOT	___tls_get_addr @@ -73,13 +73,13 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE because variable is referenced through @gottpoff too   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax - [0-9a-f]+:	2b 83 e0 ff ff ff[ 	]+sub    0xffffffe0\(%ebx\),%eax + [0-9a-f]+:	2b 83 e0 ff ff ff[ 	]+sub    -0x20\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	sG3   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	8b 83 e0 ff ff ff[ 	]+mov    0xffffffe0\(%ebx\),%eax + [0-9a-f]+:	8b 83 e0 ff ff ff[ 	]+mov    -0x20\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	sG3   [0-9a-f]+:	f7 d8[ 	]+neg    %eax   [0-9a-f]+:	90[ 	]+nop * @@ -87,16 +87,15 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE because variable is referenced through @gotntpoff too - [0-9a-f]+:	8b 83 f0 ff ff ff[ 	]+mov    0xfffffff0\(%ebx\),%eax + [0-9a-f]+:	8b 83 f0 ff ff ff[ 	]+mov    -0x10\(%ebx\),%eax  #				->R_386_TLS_TPOFF	sG4 - [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	90[ 	]+nop * + [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 *   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax - [0-9a-f]+:	03 83 f0 ff ff ff[ 	]+add    0xfffffff0\(%ebx\),%eax + [0-9a-f]+:	03 83 f0 ff ff ff[ 	]+add    -0x10\(%ebx\),%eax  #				->R_386_TLS_TPOFF	sG4   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -104,22 +103,21 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE because variable is referenced through @gotntpoff too   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax - [0-9a-f]+:	03 83 e4 ff ff ff[ 	]+add    0xffffffe4\(%ebx\),%eax + [0-9a-f]+:	03 83 e4 ff ff ff[ 	]+add    -0x1c\(%ebx\),%eax  #				->R_386_TLS_TPOFF	sG5   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	8b 83 e4 ff ff ff[ 	]+mov    0xffffffe4\(%ebx\),%eax + [0-9a-f]+:	8b 83 e4 ff ff ff[ 	]+mov    -0x1c\(%ebx\),%eax  #				->R_386_TLS_TPOFF	sG5 - [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	90[ 	]+nop * + [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 -> IE because variable is referenced through @gottpoff too - [0-9a-f]+:	8b 83 f4 ff ff ff[ 	]+mov    0xfffffff4\(%ebx\),%eax + [0-9a-f]+:	8b 83 f4 ff ff ff[ 	]+mov    -0xc\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	sG6   [0-9a-f]+:	f7 d8[ 	]+neg    %eax   [0-9a-f]+:	90[ 	]+nop * @@ -127,7 +125,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax - [0-9a-f]+:	2b 83 f4 ff ff ff[ 	]+sub    0xfffffff4\(%ebx\),%eax + [0-9a-f]+:	2b 83 f4 ff ff ff[ 	]+sub    -0xc\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	sG6   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -137,7 +135,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 8b 0d 00 00 00 00[ 	]+mov    %gs:0x0,%ecx   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	03 8b e4 ff ff ff[ 	]+add    0xffffffe4\(%ebx\),%ecx + [0-9a-f]+:	03 8b e4 ff ff ff[ 	]+add    -0x1c\(%ebx\),%ecx  #				->R_386_TLS_TPOFF	sG5   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -147,12 +145,12 @@ Disassembly of section .text:   [0-9a-f]+:	65 8b 0d 00 00 00 00[ 	]+mov    %gs:0x0,%ecx   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	2b 8b f4 ff ff ff[ 	]+sub    0xfffffff4\(%ebx\),%ecx + [0-9a-f]+:	2b 8b f4 ff ff ff[ 	]+sub    -0xc\(%ebx\),%ecx  #				->R_386_TLS_TPOFF32	sG6   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	8b 5d fc[ 	]+mov    0xfffffffc\(%ebp\),%ebx + [0-9a-f]+:	8b 5d fc[ 	]+mov    -0x4\(%ebp\),%ebx   [0-9a-f]+:	c9[ 	]+leave *   [0-9a-f]+:	c3[ 	]+ret * diff --git a/ld/testsuite/ld-i386/tlsgdesc.rd b/ld/testsuite/ld-i386/tlsgdesc.rd index 9253d22cef1d..0c5c42514ef7 100644 --- a/ld/testsuite/ld-i386/tlsgdesc.rd +++ b/ld/testsuite/ld-i386/tlsgdesc.rd @@ -45,25 +45,24 @@ Program Headers:  Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 8 entries:   Offset +Info +Type +Sym.Value +Sym. Name -[0-9a-f]+ +0+225 R_386_TLS_TPOFF32 0+   sG3 -[0-9a-f]+ +0+30e R_386_TLS_TPOFF   0+   sG5 -[0-9a-f]+ +0+423 R_386_TLS_DTPMOD3 0+   sG2 -[0-9a-f]+ +0+424 R_386_TLS_DTPOFF3 0+   sG2 -[0-9a-f]+ +0+50e R_386_TLS_TPOFF   0+   sG4 -[0-9a-f]+ +0+725 R_386_TLS_TPOFF32 0+   sG6 -[0-9a-f]+ +0+923 R_386_TLS_DTPMOD3 0+   sG1 -[0-9a-f]+ +0+924 R_386_TLS_DTPOFF3 0+   sG1 +[0-9a-f ]+R_386_TLS_TPOFF32 0+   sG3 +[0-9a-f ]+R_386_TLS_TPOFF   0+   sG5 +[0-9a-f ]+R_386_TLS_DTPMOD3 0+   sG2 +[0-9a-f ]+R_386_TLS_DTPOFF3 0+   sG2 +[0-9a-f ]+R_386_TLS_TPOFF   0+   sG4 +[0-9a-f ]+R_386_TLS_TPOFF32 0+   sG6 +[0-9a-f ]+R_386_TLS_DTPMOD3 0+   sG1 +[0-9a-f ]+R_386_TLS_DTPOFF3 0+   sG1  Relocation section '.rel.plt' at offset 0x[0-9a-f]+ contains 3 entries:   Offset     Info    Type            Sym.Value  Sym. Name -[0-9a-f]+  0+c07 R_386_JUMP_SLOT   0+   ___tls_get_addr -[0-9a-f]+  0+929 R_386_TLS_DESC    0+   sG1 -[0-9a-f]+  0+429 R_386_TLS_DESC    0+   sG2 +[0-9a-f ]+R_386_JUMP_SLOT   0+   ___tls_get_addr +[0-9a-f ]+R_386_TLS_DESC    0+   sG1 +[0-9a-f ]+R_386_TLS_DESC    0+   sG2 -Symbol table '.dynsym' contains 13 entries: +Symbol table '.dynsym' contains [0-9]+ entries:   +Num: + Value  Size Type + Bind +Vis +Ndx Name   +[0-9]+: 0+ +0 NOTYPE  LOCAL  DEFAULT  UND * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +7 *   +[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT  UND sG3   +[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT  UND sG5   +[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT  UND sG2 @@ -76,7 +75,7 @@ Symbol table '.dynsym' contains 13 entries:   +[0-9]+: [0-9a-f]+ +0 NOTYPE  GLOBAL DEFAULT  ABS _end   +[0-9]+: 0+ +0 NOTYPE  GLOBAL DEFAULT  UND ___tls_get_addr -Symbol table '.symtab' contains 27 entries: +Symbol table '.symtab' contains 24 entries:   +Num: +Value  Size Type +Bind +Vis +Ndx Name   +[0-9]+: 0+ +0 NOTYPE  LOCAL  DEFAULT  UND *   +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +1 * @@ -89,9 +88,6 @@ Symbol table '.symtab' contains 27 entries:   +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +8 *   +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +9 *   +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +10 * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +11 * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +12 * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +13 *   +[0-9]+: [0-9a-f]+ +0 OBJECT  LOCAL  HIDDEN  ABS _DYNAMIC   +[0-9]+: [0-9a-f]+ +0 OBJECT  LOCAL  HIDDEN  ABS _GLOBAL_OFFSET_TABLE_   +[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT  UND sG3 diff --git a/ld/testsuite/ld-i386/tlsnopic.dd b/ld/testsuite/ld-i386/tlsnopic.dd index ddac1e231e31..a0a8853f2cef 100644 --- a/ld/testsuite/ld-i386/tlsnopic.dd +++ b/ld/testsuite/ld-i386/tlsnopic.dd @@ -153,7 +153,7 @@ Disassembly of section .text:      10e9:	90[ 	]+nop *      10ea:	90[ 	]+nop *      10eb:	90[ 	]+nop * -    10ec:	8b 5d fc[ 	]+mov    0xfffffffc\(%ebp\),%ebx +    10ec:	8b 5d fc[ 	]+mov    -0x4\(%ebp\),%ebx      10ef:	c9[ 	]+leave *      10f0:	c3[ 	]+ret *      10f1:	90[ 	]+nop * diff --git a/ld/testsuite/ld-i386/tlsnopic.rd b/ld/testsuite/ld-i386/tlsnopic.rd index d8dcc66357fb..6ba628b4dac4 100644 --- a/ld/testsuite/ld-i386/tlsnopic.rd +++ b/ld/testsuite/ld-i386/tlsnopic.rd @@ -69,11 +69,9 @@ Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 20 entries:  [0-9a-f ]+R_386_TLS_TPOFF   0+   sg2 -Symbol table '.dynsym' contains 12 entries: +Symbol table '.dynsym' contains [0-9]+ entries:   +Num: +Value  Size Type +Bind +Vis +Ndx Name   +[0-9]+: 0+ +0 NOTYPE  LOCAL  DEFAULT  UND * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +5 * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +6 *   +[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT  UND sg3   +[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT  UND sg4   +[0-9]+: 0+1000 +0 FUNC +GLOBAL DEFAULT +5 fn3 @@ -84,7 +82,7 @@ Symbol table '.dynsym' contains 12 entries:   +[0-9]+: [0-9a-f]+ +0 NOTYPE  GLOBAL DEFAULT  ABS _edata   +[0-9]+: [0-9a-f]+ +0 NOTYPE  GLOBAL DEFAULT  ABS _end -Symbol table '.symtab' contains 33 entries: +Symbol table '.symtab' contains 30 entries:   +Num: +Value  Size Type +Bind +Vis +Ndx Name   +[0-9]+: 0+ +0 NOTYPE  LOCAL  DEFAULT  UND *   +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +1 * @@ -96,9 +94,6 @@ Symbol table '.symtab' contains 33 entries:   +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +7 *   +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +8 *   +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +9 * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +10 * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +11 * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +12 *   +[0-9]+: 0+00 +0 TLS +LOCAL  DEFAULT +6 bl1   +[0-9]+: 0+04 +0 TLS +LOCAL  DEFAULT +6 bl2   +[0-9]+: 0+08 +0 TLS +LOCAL  DEFAULT +6 bl3 diff --git a/ld/testsuite/ld-i386/tlspic.dd b/ld/testsuite/ld-i386/tlspic.dd index 98fcf0114772..dd436d2f8d4a 100644 --- a/ld/testsuite/ld-i386/tlspic.dd +++ b/ld/testsuite/ld-i386/tlspic.dd @@ -22,7 +22,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *  #  GD - [0-9a-f]+:	8d 04 1d d4 ff ff ff[ 	]+lea    0xffffffd4\(,%ebx,1\),%eax + [0-9a-f]+:	8d 04 1d d4 ff ff ff[ 	]+lea    -0x2c\(,%ebx,1\),%eax  #				->R_386_TLS_DTPMOD32	sg1   [0-9a-f]+:	e8 cf ff ff ff[ 	]+call   [0-9a-f]+ <___tls_get_addr@plt>  #				->R_386_JUMP_SLOT	___tls_get_addr @@ -32,7 +32,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE because variable is referenced through @gottpoff too   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax - [0-9a-f]+:	2b 83 f0 ff ff ff[ 	]+sub    0xfffffff0\(%ebx\),%eax + [0-9a-f]+:	2b 83 f0 ff ff ff[ 	]+sub    -0x10\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	sg2   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -40,7 +40,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE because variable is referenced through @gotntpoff too   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax - [0-9a-f]+:	03 83 b4 ff ff ff[ 	]+add    0xffffffb4\(%ebx\),%eax + [0-9a-f]+:	03 83 b4 ff ff ff[ 	]+add    -0x4c\(%ebx\),%eax  #				->R_386_TLS_TPOFF	sg3   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -48,14 +48,14 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE because variable is referenced through @gottpoff and   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax - [0-9a-f]+:	2b 83 c0 ff ff ff[ 	]+sub    0xffffffc0\(%ebx\),%eax + [0-9a-f]+:	2b 83 c0 ff ff ff[ 	]+sub    -0x40\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	sg4   [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]+:	8d 04 1d 88 ff ff ff[ 	]+lea    0xffffff88\(,%ebx,1\),%eax + [0-9a-f]+:	8d 04 1d 88 ff ff ff[ 	]+lea    -0x78\(,%ebx,1\),%eax  #				->R_386_TLS_DTPMOD32	[0x00000000 0x20000000]   [0-9a-f]+:	e8 8f ff ff ff[ 	]+call   [0-9a-f]+ <___tls_get_addr@plt>  #				->R_386_JUMP_SLOT	___tls_get_addr @@ -65,7 +65,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE against local variable referenced through @gottpoff too   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax - [0-9a-f]+:	2b 83 90 ff ff ff[ 	]+sub    0xffffff90\(%ebx\),%eax + [0-9a-f]+:	2b 83 90 ff ff ff[ 	]+sub    -0x70\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	[0xdcffffff]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -73,7 +73,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE against local variable referenced through @gotntpoff   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax - [0-9a-f]+:	03 83 94 ff ff ff[ 	]+add    0xffffff94\(%ebx\),%eax + [0-9a-f]+:	03 83 94 ff ff ff[ 	]+add    -0x6c\(%ebx\),%eax  #				->R_386_TLS_TPOFF	[0x28000000]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -81,14 +81,14 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE against local variable referenced through @gottpoff and   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax - [0-9a-f]+:	2b 83 98 ff ff ff[ 	]+sub    0xffffff98\(%ebx\),%eax + [0-9a-f]+:	2b 83 98 ff ff ff[ 	]+sub    -0x68\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	[0xd4ffffff]   [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]+:	8d 04 1d f4 ff ff ff[ 	]+lea    0xfffffff4\(,%ebx,1\),%eax + [0-9a-f]+:	8d 04 1d f4 ff ff ff[ 	]+lea    -0xc\(,%ebx,1\),%eax  #				->R_386_TLS_DTPMOD32	[0x00000000 0x40000000]   [0-9a-f]+:	e8 4f ff ff ff[ 	]+call   [0-9a-f]+ <___tls_get_addr@plt>  #				->R_386_JUMP_SLOT	___tls_get_addr @@ -98,7 +98,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE against hidden and local variable referenced through @gottpoff too   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax - [0-9a-f]+:	2b 83 fc ff ff ff[ 	]+sub    0xfffffffc\(%ebx\),%eax + [0-9a-f]+:	2b 83 fc ff ff ff[ 	]+sub    -0x4\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	[0xbcffffff]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -106,7 +106,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE against hidden and local variable referenced through @gotntpoff too   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax - [0-9a-f]+:	03 83 b8 ff ff ff[ 	]+add    0xffffffb8\(%ebx\),%eax + [0-9a-f]+:	03 83 b8 ff ff ff[ 	]+add    -0x48\(%ebx\),%eax  #				->R_386_TLS_TPOFF	[0x48000000]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -114,14 +114,14 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE against hidden and local variable referenced through @gottpoff and @gotntpoff too   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax - [0-9a-f]+:	2b 83 dc ff ff ff[ 	]+sub    0xffffffdc\(%ebx\),%eax + [0-9a-f]+:	2b 83 dc ff ff ff[ 	]+sub    -0x24\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	[0xb4ffffff]   [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]+:	8d 04 1d ac ff ff ff[ 	]+lea    0xffffffac\(,%ebx,1\),%eax + [0-9a-f]+:	8d 04 1d ac ff ff ff[ 	]+lea    -0x54\(,%ebx,1\),%eax  #				->R_386_TLS_DTPMOD32	[0x00000000 0x60000000]   [0-9a-f]+:	e8 0f ff ff ff[ 	]+call   [0-9a-f]+ <___tls_get_addr@plt>  #				->R_386_JUMP_SLOT	___tls_get_addr @@ -131,7 +131,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE against hidden but not local variable referenced through   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax - [0-9a-f]+:	2b 83 bc ff ff ff[ 	]+sub    0xffffffbc\(%ebx\),%eax + [0-9a-f]+:	2b 83 bc ff ff ff[ 	]+sub    -0x44\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	[0x9cffffff]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -139,7 +139,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE against hidden but not local variable referenced through   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax - [0-9a-f]+:	03 83 e4 ff ff ff[ 	]+add    0xffffffe4\(%ebx\),%eax + [0-9a-f]+:	03 83 e4 ff ff ff[ 	]+add    -0x1c\(%ebx\),%eax  #				->R_386_TLS_TPOFF	[0x68000000]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -147,14 +147,14 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *  #  GD -> IE against hidden but not local variable referenced through   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax - [0-9a-f]+:	2b 83 cc ff ff ff[ 	]+sub    0xffffffcc\(%ebx\),%eax + [0-9a-f]+:	2b 83 cc ff ff ff[ 	]+sub    -0x34\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	[0x94ffffff]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *  #  LD - [0-9a-f]+:	8d 83 a4 ff ff ff[ 	]+lea    0xffffffa4\(%ebx\),%eax + [0-9a-f]+:	8d 83 a4 ff ff ff[ 	]+lea    -0x5c\(%ebx\),%eax  #				->R_386_TLS_DTPMOD32	[0x00000000 0x00000000]   [0-9a-f]+:	e8 d0 fe ff ff[ 	]+call   [0-9a-f]+ <___tls_get_addr@plt>  #				->R_386_JUMP_SLOT	___tls_get_addr @@ -171,7 +171,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *  #  LD against hidden and local variables - [0-9a-f]+:	8d 83 a4 ff ff ff[ 	]+lea    0xffffffa4\(%ebx\),%eax + [0-9a-f]+:	8d 83 a4 ff ff ff[ 	]+lea    -0x5c\(%ebx\),%eax  #				->R_386_TLS_DTPMOD32	[0x00000000 0x00000000]   [0-9a-f]+:	e8 b1 fe ff ff[ 	]+call   [0-9a-f]+ <___tls_get_addr@plt>  #				->R_386_JUMP_SLOT	___tls_get_addr @@ -188,7 +188,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *  #  LD against hidden but not local variables - [0-9a-f]+:	8d 83 a4 ff ff ff[ 	]+lea    0xffffffa4\(%ebx\),%eax + [0-9a-f]+:	8d 83 a4 ff ff ff[ 	]+lea    -0x5c\(%ebx\),%eax  #				->R_386_TLS_DTPMOD32	[0x00000000 0x00000000]   [0-9a-f]+:	e8 92 fe ff ff[ 	]+call   [0-9a-f]+ <___tls_get_addr@plt>  #				->R_386_JUMP_SLOT	___tls_get_addr @@ -206,7 +206,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 8b 0d 00 00 00 00[ 	]+mov    %gs:0x0,%ecx   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	2b 8b f0 ff ff ff[ 	]+sub    0xfffffff0\(%ebx\),%ecx + [0-9a-f]+:	2b 8b f0 ff ff ff[ 	]+sub    -0x10\(%ebx\),%ecx  #				->R_386_TLS_TPOFF32	sg2   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -216,7 +216,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	2b 83 c0 ff ff ff[ 	]+sub    0xffffffc0\(%ebx\),%eax + [0-9a-f]+:	2b 83 c0 ff ff ff[ 	]+sub    -0x40\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	sg4   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -226,7 +226,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 8b 0d 00 00 00 00[ 	]+mov    %gs:0x0,%ecx   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	03 8b b4 ff ff ff[ 	]+add    0xffffffb4\(%ebx\),%ecx + [0-9a-f]+:	03 8b b4 ff ff ff[ 	]+add    -0x4c\(%ebx\),%ecx  #				->R_386_TLS_TPOFF	sg3   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -236,7 +236,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	03 83 c4 ff ff ff[ 	]+add    0xffffffc4\(%ebx\),%eax + [0-9a-f]+:	03 83 c4 ff ff ff[ 	]+add    -0x3c\(%ebx\),%eax  #				->R_386_TLS_TPOFF	sg4   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -246,7 +246,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 8b 0d 00 00 00 00[ 	]+mov    %gs:0x0,%ecx   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	2b 8b 90 ff ff ff[ 	]+sub    0xffffff90\(%ebx\),%ecx + [0-9a-f]+:	2b 8b 90 ff ff ff[ 	]+sub    -0x70\(%ebx\),%ecx  #				->R_386_TLS_TPOFF32	[0xdcffffff]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -256,7 +256,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	2b 83 98 ff ff ff[ 	]+sub    0xffffff98\(%ebx\),%eax + [0-9a-f]+:	2b 83 98 ff ff ff[ 	]+sub    -0x68\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	[0xd4ffffff]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -266,7 +266,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 8b 0d 00 00 00 00[ 	]+mov    %gs:0x0,%ecx   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	03 8b 94 ff ff ff[ 	]+add    0xffffff94\(%ebx\),%ecx + [0-9a-f]+:	03 8b 94 ff ff ff[ 	]+add    -0x6c\(%ebx\),%ecx  #				->R_386_TLS_TPOFF	[0x28000000]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -276,7 +276,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	03 83 9c ff ff ff[ 	]+add    0xffffff9c\(%ebx\),%eax + [0-9a-f]+:	03 83 9c ff ff ff[ 	]+add    -0x64\(%ebx\),%eax  #				->R_386_TLS_TPOFF	[0x2c000000]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -286,7 +286,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 8b 0d 00 00 00 00[ 	]+mov    %gs:0x0,%ecx   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	2b 8b fc ff ff ff[ 	]+sub    0xfffffffc\(%ebx\),%ecx + [0-9a-f]+:	2b 8b fc ff ff ff[ 	]+sub    -0x4\(%ebx\),%ecx  #				->R_386_TLS_TPOFF32	[0xbcffffff]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -296,7 +296,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	2b 83 dc ff ff ff[ 	]+sub    0xffffffdc\(%ebx\),%eax + [0-9a-f]+:	2b 83 dc ff ff ff[ 	]+sub    -0x24\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	[0xb4ffffff]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -306,7 +306,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 8b 0d 00 00 00 00[ 	]+mov    %gs:0x0,%ecx   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	03 8b b8 ff ff ff[ 	]+add    0xffffffb8\(%ebx\),%ecx + [0-9a-f]+:	03 8b b8 ff ff ff[ 	]+add    -0x48\(%ebx\),%ecx  #				->R_386_TLS_TPOFF	[0x48000000]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -316,7 +316,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	03 83 e0 ff ff ff[ 	]+add    0xffffffe0\(%ebx\),%eax + [0-9a-f]+:	03 83 e0 ff ff ff[ 	]+add    -0x20\(%ebx\),%eax  #				->R_386_TLS_TPOFF	[0x4c000000]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -326,7 +326,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 8b 0d 00 00 00 00[ 	]+mov    %gs:0x0,%ecx   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	2b 8b bc ff ff ff[ 	]+sub    0xffffffbc\(%ebx\),%ecx + [0-9a-f]+:	2b 8b bc ff ff ff[ 	]+sub    -0x44\(%ebx\),%ecx  #				->R_386_TLS_TPOFF32	[0x9cffffff]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -336,7 +336,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	2b 83 cc ff ff ff[ 	]+sub    0xffffffcc\(%ebx\),%eax + [0-9a-f]+:	2b 83 cc ff ff ff[ 	]+sub    -0x34\(%ebx\),%eax  #				->R_386_TLS_TPOFF32	[0x94ffffff]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -346,7 +346,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 8b 0d 00 00 00 00[ 	]+mov    %gs:0x0,%ecx   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	03 8b e4 ff ff ff[ 	]+add    0xffffffe4\(%ebx\),%ecx + [0-9a-f]+:	03 8b e4 ff ff ff[ 	]+add    -0x1c\(%ebx\),%ecx  #				->R_386_TLS_TPOFF	[0x68000000]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -356,7 +356,7 @@ Disassembly of section .text:   [0-9a-f]+:	65 a1 00 00 00 00[ 	]+mov    %gs:0x0,%eax   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	03 83 d0 ff ff ff[ 	]+add    0xffffffd0\(%ebx\),%eax + [0-9a-f]+:	03 83 d0 ff ff ff[ 	]+add    -0x30\(%ebx\),%eax  #				->R_386_TLS_TPOFF	[0x6c000000]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -364,7 +364,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *  #  Direct access through %gs  #  @gotntpoff IE against global var - [0-9a-f]+:	8b 8b c8 ff ff ff[ 	]+mov    0xffffffc8\(%ebx\),%ecx + [0-9a-f]+:	8b 8b c8 ff ff ff[ 	]+mov    -0x38\(%ebx\),%ecx  #				->R_386_TLS_TPOFF	sg5   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -374,7 +374,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *  #  @gotntpoff IE against local var - [0-9a-f]+:	8b 83 a0 ff ff ff[ 	]+mov    0xffffffa0\(%ebx\),%eax + [0-9a-f]+:	8b 83 a0 ff ff ff[ 	]+mov    -0x60\(%ebx\),%eax  #				->R_386_TLS_TPOFF	[0x30000000]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -384,7 +384,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *  #  @gotntpoff IE against hidden and local var - [0-9a-f]+:	8b 93 e8 ff ff ff[ 	]+mov    0xffffffe8\(%ebx\),%edx + [0-9a-f]+:	8b 93 e8 ff ff ff[ 	]+mov    -0x18\(%ebx\),%edx  #				->R_386_TLS_TPOFF	[0x50000000]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -394,7 +394,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *  #  @gotntpoff IE against hidden but not local var - [0-9a-f]+:	8b 8b ec ff ff ff[ 	]+mov    0xffffffec\(%ebx\),%ecx + [0-9a-f]+:	8b 8b ec ff ff ff[ 	]+mov    -0x14\(%ebx\),%ecx  #				->R_386_TLS_TPOFF	[0x70000000]   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * @@ -403,7 +403,7 @@ Disassembly of section .text:   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop *   [0-9a-f]+:	90[ 	]+nop * - [0-9a-f]+:	8b 5d fc[ 	]+mov    0xfffffffc\(%ebp\),%ebx + [0-9a-f]+:	8b 5d fc[ 	]+mov    -0x4\(%ebp\),%ebx   [0-9a-f]+:	c9[ 	]+leave *   [0-9a-f]+:	c3[ 	]+ret *   [0-9a-f]+:	90[ 	]+nop * diff --git a/ld/testsuite/ld-i386/tlspic.rd b/ld/testsuite/ld-i386/tlspic.rd index 890a4938efe0..c902cf37dd2c 100644 --- a/ld/testsuite/ld-i386/tlspic.rd +++ b/ld/testsuite/ld-i386/tlspic.rd @@ -81,12 +81,9 @@ Relocation section '.rel.plt' at offset 0x[0-9a-f]+ contains 1 entries:   Offset +Info +Type +Sym.Value +Sym. Name  [0-9a-f ]+R_386_JUMP_SLOT   0+   ___tls_get_addr -Symbol table '.dynsym' contains 17 entries: +Symbol table '.dynsym' contains [0-9]+ entries:   +Num: +Value  Size Type +Bind +Vis +Ndx Name   +[0-9]+: 0+ +0 NOTYPE  LOCAL  DEFAULT  UND * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +7 * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +8 * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +9 *   +[0-9]+: 0+1c +0 TLS +GLOBAL DEFAULT +8 sg8   +[0-9]+: 0+8 +0 TLS +GLOBAL DEFAULT +8 sg3   +[0-9]+: 0+c +0 TLS +GLOBAL DEFAULT +8 sg4 @@ -101,7 +98,7 @@ Symbol table '.dynsym' contains 17 entries:   +[0-9]+: [0-9a-f]+ +0 NOTYPE  GLOBAL DEFAULT  ABS _end   +[0-9]+: 0+ +0 NOTYPE  GLOBAL DEFAULT  UND ___tls_get_addr -Symbol table '.symtab' contains 55 entries: +Symbol table '.symtab' contains 52 entries:   +Num: +Value  Size Type +Bind +Vis +Ndx Name   +[0-9]+: 0+ +0 NOTYPE  LOCAL  DEFAULT  UND *   +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +1 * @@ -116,9 +113,6 @@ Symbol table '.symtab' contains 55 entries:   +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +10 *   +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +11 *   +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +12 * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +13 * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +14 * - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL  DEFAULT +15 *   +[0-9]+: 0+20 +0 TLS +LOCAL  DEFAULT +8 sl1   +[0-9]+: 0+24 +0 TLS +LOCAL  DEFAULT +8 sl2   +[0-9]+: 0+28 +0 TLS +LOCAL  DEFAULT +8 sl3 diff --git a/ld/testsuite/ld-i386/vxworks1-lib.rd b/ld/testsuite/ld-i386/vxworks1-lib.rd index ab567b6e72e5..61ff293874c4 100644 --- a/ld/testsuite/ld-i386/vxworks1-lib.rd +++ b/ld/testsuite/ld-i386/vxworks1-lib.rd @@ -6,7 +6,7 @@ Relocation section '\.rel\.plt' at offset .* contains 2 entries:  Relocation section '\.rel\.dyn' at offset .* contains 4 entries:   Offset     Info    Type            Sym\.Value  Sym\. Name -00081c00  00000008 R_386_RELATIVE * +00081800  00000008 R_386_RELATIVE *  00080c03  .*01 R_386_32          00000000   __GOTT_BASE__  00080c09  .*01 R_386_32          00000000   __GOTT_INDEX__ -00081414  .*06 R_386_GLOB_DAT    00081800   x +00081414  .*06 R_386_GLOB_DAT    00081c00   x diff --git a/ld/testsuite/ld-i386/vxworks1-lib.td b/ld/testsuite/ld-i386/vxworks1-lib.td new file mode 100644 index 000000000000..9f223e38da16 --- /dev/null +++ b/ld/testsuite/ld-i386/vxworks1-lib.td @@ -0,0 +1,3 @@ +#... + 0x0+16 \(TEXTREL\) +0x0 +#pass diff --git a/ld/testsuite/ld-i386/vxworks1.ld b/ld/testsuite/ld-i386/vxworks1.ld index ff25b39a540a..ed76f185c2e5 100644 --- a/ld/testsuite/ld-i386/vxworks1.ld +++ b/ld/testsuite/ld-i386/vxworks1.ld @@ -23,8 +23,8 @@ SECTIONS    .got : { *(.got.plt) *(.got) }    . = ALIGN (0x400); -  .bss : { *(.bss) *(.dynbss) } +  .data : { *(.data) }    . = ALIGN (0x400); -  .data : { *(.data) } +  .bss : { *(.bss) *(.dynbss) }  } diff --git a/ld/testsuite/ld-i386/warn1.d b/ld/testsuite/ld-i386/warn1.d new file mode 100644 index 000000000000..dd541f25df91 --- /dev/null +++ b/ld/testsuite/ld-i386/warn1.d @@ -0,0 +1,4 @@ +#name: --warn-shared-textrel --fatal-warnings +#as: --32 +#ld: -shared -melf_i386 --warn-shared-textrel --fatal-warnings +#error: .*warning: creating a DT_TEXTREL in a shared object. diff --git a/ld/testsuite/ld-i386/warn1.s b/ld/testsuite/ld-i386/warn1.s new file mode 100644 index 000000000000..ca3481a48fb4 --- /dev/null +++ b/ld/testsuite/ld-i386/warn1.s @@ -0,0 +1,5 @@ +	.text +	.globl foo +	.type	foo, @function +foo: +	movl	bar, %eax  | 
