[lld] r371588 - [ELF][test] Make tests more tolerant to exact symbol addresses
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 10 23:20:14 PDT 2019
Author: maskray
Date: Tue Sep 10 23:20:14 2019
New Revision: 371588
URL: http://llvm.org/viewvc/llvm-project?rev=371588&view=rev
Log:
[ELF][test] Make tests more tolerant to exact symbol addresses
Modified:
lld/trunk/test/ELF/relocation-copy-flags.s
lld/trunk/test/ELF/relocation-copy-relro.s
lld/trunk/test/ELF/tls-opt.s
lld/trunk/test/ELF/undef-with-plt-addr.s
lld/trunk/test/ELF/x86-64-gotpc-relax-nopic.s
lld/trunk/test/ELF/x86-64-plt-high-addr.s
lld/trunk/test/ELF/x86-64-plt.s
lld/trunk/test/ELF/x86-64-tls-gdie.s
lld/trunk/test/ELF/ztext.s
Modified: lld/trunk/test/ELF/relocation-copy-flags.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/relocation-copy-flags.s?rev=371588&r1=371587&r2=371588&view=diff
==============================================================================
--- lld/trunk/test/ELF/relocation-copy-flags.s (original)
+++ lld/trunk/test/ELF/relocation-copy-flags.s Tue Sep 10 23:20:14 2019
@@ -2,7 +2,7 @@
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/relocation-copy.s -o %t2.o
-// RUN: ld.lld %t2.o -o %t2.so -shared
+// RUN: ld.lld %t2.o -o %t2.so -shared -soname=so
// RUN: ld.lld --hash-style=sysv %t.o %t2.so -o %t.exe
// RUN: llvm-readobj -S --section-data -r %t.exe | FileCheck %s
Modified: lld/trunk/test/ELF/relocation-copy-relro.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/relocation-copy-relro.s?rev=371588&r1=371587&r2=371588&view=diff
==============================================================================
--- lld/trunk/test/ELF/relocation-copy-relro.s (original)
+++ lld/trunk/test/ELF/relocation-copy-relro.s Tue Sep 10 23:20:14 2019
@@ -4,28 +4,28 @@
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/relocation-copy-relro.s -o %t2.o
-// RUN: ld.lld -shared %t2.o -o %t.so
-// RUN: ld.lld --hash-style=sysv %t.o %t.so -o %t3
+// RUN: ld.lld -shared %t2.o -soname=so -o %t.so
+// RUN: ld.lld %t.o %t.so -o %t3
// RUN: llvm-readobj -S -l -r %t3 | FileCheck %s
-// CHECK: Name: .bss.rel.ro (48)
+// CHECK: Name: .bss.rel.ro
// CHECK-NEXT: Type: SHT_NOBITS (0x8)
// CHECK-NEXT: Flags [ (0x3)
// CHECK-NEXT: SHF_ALLOC (0x2)
// CHECK-NEXT: SHF_WRITE (0x1)
// CHECK-NEXT: ]
-// CHECK-NEXT: Address: 0x2020B0
-// CHECK-NEXT: Offset: 0x20B0
+// CHECK-NEXT: Address: 0x2020C0
+// CHECK-NEXT: Offset: 0x20C0
// CHECK-NEXT: Size: 8
-// CHECK: 0x2020B0 R_X86_64_COPY a 0x0
-// CHECK: 0x2020B4 R_X86_64_COPY b 0x0
+// CHECK: 0x2020C0 R_X86_64_COPY a 0x0
+// CHECK: 0x2020C4 R_X86_64_COPY b 0x0
// CHECK: Type: PT_GNU_RELRO (0x6474E552)
// CHECK-NEXT: Offset: 0x2000
// CHECK-NEXT: VirtualAddress: 0x202000
// CHECK-NEXT: PhysicalAddress: 0x202000
-// CHECK-NEXT: FileSize: 176
+// CHECK-NEXT: FileSize: 192
// CHECK-NEXT: MemSize: 4096
.text
Modified: lld/trunk/test/ELF/tls-opt.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/tls-opt.s?rev=371588&r1=371587&r2=371588&view=diff
==============================================================================
--- lld/trunk/test/ELF/tls-opt.s (original)
+++ lld/trunk/test/ELF/tls-opt.s Tue Sep 10 23:20:14 2019
@@ -8,36 +8,36 @@
// NORELOC-NEXT: ]
// DISASM: _start:
-// DISASM-NEXT: 201000: movq $-8, %rax
-// DISASM-NEXT: 201007: movq $-8, %r15
-// DISASM-NEXT: 20100e: leaq -8(%rax), %rax
-// DISASM-NEXT: 201015: leaq -8(%r15), %r15
-// DISASM-NEXT: 20101c: addq $-8, %rsp
-// DISASM-NEXT: 201023: addq $-8, %r12
-// DISASM-NEXT: 20102a: movq $-4, %rax
-// DISASM-NEXT: 201031: movq $-4, %r15
-// DISASM-NEXT: 201038: leaq -4(%rax), %rax
-// DISASM-NEXT: 20103f: leaq -4(%r15), %r15
-// DISASM-NEXT: 201046: addq $-4, %rsp
-// DISASM-NEXT: 20104d: addq $-4, %r12
+// DISASM-NEXT: movq $-8, %rax
+// DISASM-NEXT: movq $-8, %r15
+// DISASM-NEXT: leaq -8(%rax), %rax
+// DISASM-NEXT: leaq -8(%r15), %r15
+// DISASM-NEXT: addq $-8, %rsp
+// DISASM-NEXT: addq $-8, %r12
+// DISASM-NEXT: movq $-4, %rax
+// DISASM-NEXT: movq $-4, %r15
+// DISASM-NEXT: leaq -4(%rax), %rax
+// DISASM-NEXT: leaq -4(%r15), %r15
+// DISASM-NEXT: addq $-4, %rsp
+// DISASM-NEXT: addq $-4, %r12
// LD to LE:
-// DISASM-NEXT: 201054: movq %fs:0, %rax
-// DISASM-NEXT: 201060: leaq -8(%rax), %rcx
-// DISASM-NEXT: 201067: movq %fs:0, %rax
-// DISASM-NEXT: 201073: leaq -4(%rax), %rcx
+// DISASM-NEXT: movq %fs:0, %rax
+// DISASM-NEXT: leaq -8(%rax), %rcx
+// DISASM-NEXT: movq %fs:0, %rax
+// DISASM-NEXT: leaq -4(%rax), %rcx
// GD to LE:
-// DISASM-NEXT: 20107a: movq %fs:0, %rax
-// DISASM-NEXT: 201083: leaq -8(%rax), %rax
-// DISASM-NEXT: 20108a: movq %fs:0, %rax
-// DISASM-NEXT: 201093: leaq -4(%rax), %rax
+// DISASM-NEXT: movq %fs:0, %rax
+// DISASM-NEXT: leaq -8(%rax), %rax
+// DISASM-NEXT: movq %fs:0, %rax
+// DISASM-NEXT: leaq -4(%rax), %rax
// LD to LE:
// DISASM: _DTPOFF64_1:
-// DISASM-NEXT: 20109a: clc
+// DISASM-NEXT: clc
// DISASM: _DTPOFF64_2:
-// DISASM-NEXT: 2010a3: cld
+// DISASM-NEXT: cld
.type tls0, at object
.section .tbss,"awT", at nobits
Modified: lld/trunk/test/ELF/undef-with-plt-addr.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/undef-with-plt-addr.s?rev=371588&r1=371587&r2=371588&view=diff
==============================================================================
--- lld/trunk/test/ELF/undef-with-plt-addr.s (original)
+++ lld/trunk/test/ELF/undef-with-plt-addr.s Tue Sep 10 23:20:14 2019
@@ -1,7 +1,7 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/undef-with-plt-addr.s -o %t2.o
-// RUN: ld.lld %t2.o -o %t2.so -shared
+// RUN: ld.lld %t2.o -o %t2.so -shared -soname=so
// RUN: ld.lld %t.o %t2.so -o %t3
// RUN: llvm-readobj --symbols -S -r %t3 | FileCheck %s
Modified: lld/trunk/test/ELF/x86-64-gotpc-relax-nopic.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/x86-64-gotpc-relax-nopic.s?rev=371588&r1=371587&r2=371588&view=diff
==============================================================================
--- lld/trunk/test/ELF/x86-64-gotpc-relax-nopic.s (original)
+++ lld/trunk/test/ELF/x86-64-gotpc-relax-nopic.s Tue Sep 10 23:20:14 2019
@@ -2,7 +2,7 @@
# RUN: llvm-mc -filetype=obj -relax-relocations -triple=x86_64-unknown-linux %s -o %t.o
# RUN: ld.lld --hash-style=sysv %t.o -o %t1
# RUN: llvm-readobj --symbols -r %t1 | FileCheck --check-prefix=SYMRELOC %s
-# RUN: llvm-objdump -d %t1 | FileCheck --check-prefix=DISASM %s
+# RUN: llvm-objdump -d --no-show-raw-insn %t1 | FileCheck --check-prefix=DISASM %s
## There is no relocations.
# SYMRELOC: Relocations [
@@ -16,19 +16,19 @@
# DISASM: Disassembly of section .text:
# DISASM-EMPTY:
# DISASM-NEXT: _start:
-# DISASM-NEXT: 201000: {{.*}} adcq $2105344, %rax
-# DISASM-NEXT: 201007: {{.*}} addq $2105344, %rbx
-# DISASM-NEXT: 20100e: {{.*}} andq $2105344, %rcx
-# DISASM-NEXT: 201015: {{.*}} cmpq $2105344, %rdx
-# DISASM-NEXT: 20101c: {{.*}} orq $2105344, %rdi
-# DISASM-NEXT: 201023: {{.*}} sbbq $2105344, %rsi
-# DISASM-NEXT: 20102a: {{.*}} subq $2105344, %rbp
-# DISASM-NEXT: 201031: {{.*}} xorq $2105344, %r8
-# DISASM-NEXT: 201038: {{.*}} testq $2105344, %r15
+# DISASM-NEXT: 201000: adcq $2105344, %rax
+# DISASM-NEXT: addq $2105344, %rbx
+# DISASM-NEXT: andq $2105344, %rcx
+# DISASM-NEXT: cmpq $2105344, %rdx
+# DISASM-NEXT: orq $2105344, %rdi
+# DISASM-NEXT: sbbq $2105344, %rsi
+# DISASM-NEXT: subq $2105344, %rbp
+# DISASM-NEXT: xorq $2105344, %r8
+# DISASM-NEXT: testq $2105344, %r15
# RUN: ld.lld --hash-style=sysv -shared %t.o -o %t2
# RUN: llvm-readobj -S -r -d %t2 | FileCheck --check-prefix=SEC-PIC %s
-# RUN: llvm-objdump -d %t2 | FileCheck --check-prefix=DISASM-PIC %s
+# RUN: llvm-objdump -d --no-show-raw-insn %t2 | FileCheck --check-prefix=DISASM-PIC %s
# SEC-PIC: Section {
# SEC-PIC: Index:
# SEC-PIC: Name: .got
@@ -58,15 +58,15 @@
# DISASM-PIC: Disassembly of section .text:
# DISASM-PIC-EMPTY:
# DISASM-PIC-NEXT: _start:
-# DISASM-PIC-NEXT: 1000: {{.*}} adcq 4249(%rip), %rax
-# DISASM-PIC-NEXT: 1007: {{.*}} addq 4242(%rip), %rbx
-# DISASM-PIC-NEXT: 100e: {{.*}} andq 4235(%rip), %rcx
-# DISASM-PIC-NEXT: 1015: {{.*}} cmpq 4228(%rip), %rdx
-# DISASM-PIC-NEXT: 101c: {{.*}} orq 4221(%rip), %rdi
-# DISASM-PIC-NEXT: 1023: {{.*}} sbbq 4214(%rip), %rsi
-# DISASM-PIC-NEXT: 102a: {{.*}} subq 4207(%rip), %rbp
-# DISASM-PIC-NEXT: 1031: {{.*}} xorq 4200(%rip), %r8
-# DISASM-PIC-NEXT: 1038: {{.*}} testq %r15, 4193(%rip)
+# DISASM-PIC-NEXT: 1000: adcq 4249(%rip), %rax
+# DISASM-PIC-NEXT: addq 4242(%rip), %rbx
+# DISASM-PIC-NEXT: andq 4235(%rip), %rcx
+# DISASM-PIC-NEXT: cmpq 4228(%rip), %rdx
+# DISASM-PIC-NEXT: orq 4221(%rip), %rdi
+# DISASM-PIC-NEXT: sbbq 4214(%rip), %rsi
+# DISASM-PIC-NEXT: subq 4207(%rip), %rbp
+# DISASM-PIC-NEXT: xorq 4200(%rip), %r8
+# DISASM-PIC-NEXT: testq %r15, 4193(%rip)
.data
.type bar, @object
Modified: lld/trunk/test/ELF/x86-64-plt-high-addr.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/x86-64-plt-high-addr.s?rev=371588&r1=371587&r2=371588&view=diff
==============================================================================
--- lld/trunk/test/ELF/x86-64-plt-high-addr.s (original)
+++ lld/trunk/test/ELF/x86-64-plt-high-addr.s Tue Sep 10 23:20:14 2019
@@ -1,7 +1,7 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/shared.s -o %t1.o
-// RUN: ld.lld -o %t.so -shared %t1.o
+// RUN: ld.lld -o %t.so -shared %t1.o -soname=so
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t2.o
// RUN: ld.lld -o %t1.exe %t2.o %t.so -image-base=0xcafe00000000
Modified: lld/trunk/test/ELF/x86-64-plt.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/x86-64-plt.s?rev=371588&r1=371587&r2=371588&view=diff
==============================================================================
--- lld/trunk/test/ELF/x86-64-plt.s (original)
+++ lld/trunk/test/ELF/x86-64-plt.s Tue Sep 10 23:20:14 2019
@@ -1,13 +1,13 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/shared.s -o %t2.o
-// RUN: ld.lld -shared %t2.o -o %t2.so
+// RUN: ld.lld -shared -soname=so %t2.o -o %t2.so
// RUN: ld.lld -shared %t.o %t2.so -o %t
// RUN: ld.lld %t.o %t2.so -o %t3
// RUN: llvm-readobj -S -r %t | FileCheck %s
-// RUN: llvm-objdump -d %t | FileCheck --check-prefix=DISASM %s
+// RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck --check-prefix=DISASM %s
// RUN: llvm-readobj -S -r %t3 | FileCheck --check-prefix=CHECK2 %s
-// RUN: llvm-objdump -d %t3 | FileCheck --check-prefix=DISASM2 %s
+// RUN: llvm-objdump -d --no-show-raw-insn %t3 | FileCheck --check-prefix=DISASM2 %s
// CHECK: Name: .plt
// CHECK-NEXT: Type: SHT_PROGBITS
@@ -50,19 +50,11 @@
// CHECK2-NEXT: }
// CHECK2-NEXT: ]
-// Unfortunately FileCheck can't do math, so we have to check for explicit
-// values:
-
-// 0x1030 - (0x1000 + 5) = 43
-// 0x1030 - (0x1005 + 5) = 38
-// 0x1040 - (0x100a + 5) = 49
-// 0x1048 - (0x100a + 5) = 60
-
// DISASM: _start:
-// DISASM-NEXT: 1000: e9 {{.*}} jmp 43
-// DISASM-NEXT: 1005: e9 {{.*}} jmp 38
-// DISASM-NEXT: 100a: e9 {{.*}} jmp 49
-// DISASM-NEXT: 100f: e9 {{.*}} jmp 60
+// DISASM-NEXT: jmp {{.*}} <bar at plt>
+// DISASM-NEXT: jmp {{.*}} <bar at plt>
+// DISASM-NEXT: jmp {{.*}} <zed at plt>
+// DISASM-NEXT: jmp {{.*}} <_start at plt>
// 0x3018 - 0x1036 = 8162
// 0x3020 - 0x1046 = 8154
@@ -71,24 +63,24 @@
// DISASM: Disassembly of section .plt:
// DISASM-EMPTY:
// DISASM-NEXT: .plt:
-// DISASM-NEXT: 1020: ff 35 e2 1f 00 00 pushq 8162(%rip)
-// DISASM-NEXT: 1026: ff 25 e4 1f 00 00 jmpq *8164(%rip)
-// DISASM-NEXT: 102c: 0f 1f 40 00 nopl (%rax)
+// DISASM-NEXT: 1020: pushq 8162(%rip)
+// DISASM-NEXT: jmpq *8164(%rip)
+// DISASM-NEXT: nopl (%rax)
// DISASM-EMPTY:
// DISASM-NEXT: bar at plt:
-// DISASM-NEXT: 1030: ff 25 e2 1f 00 00 jmpq *8162(%rip)
-// DISASM-NEXT: 1036: 68 00 00 00 00 pushq $0
-// DISASM-NEXT: 103b: e9 e0 ff ff ff jmp -32 <.plt>
+// DISASM-NEXT: 1030: jmpq *8162(%rip)
+// DISASM-NEXT: pushq $0
+// DISASM-NEXT: jmp -32 <.plt>
// DISASM-EMPTY:
// DISASM-NEXT: zed at plt:
-// DISASM-NEXT: 1040: ff 25 da 1f 00 00 jmpq *8154(%rip)
-// DISASM-NEXT: 1046: 68 01 00 00 00 pushq $1
-// DISASM-NEXT: 104b: e9 d0 ff ff ff jmp -48 <.plt>
+// DISASM-NEXT: 1040: jmpq *8154(%rip)
+// DISASM-NEXT: pushq $1
+// DISASM-NEXT: jmp -48 <.plt>
// DISASM-EMPTY:
// DISASM-NEXT: _start at plt:
-// DISASM-NEXT: 1050: ff 25 d2 1f 00 00 jmpq *8146(%rip)
-// DISASM-NEXT: 1056: 68 02 00 00 00 pushq $2
-// DISASM-NEXT: 105b: e9 c0 ff ff ff jmp -64 <.plt>
+// DISASM-NEXT: 1050: jmpq *8146(%rip)
+// DISASM-NEXT: pushq $2
+// DISASM-NEXT: jmp -64 <.plt>
// 0x201030 - (0x201000 + 1) - 4 = 43
// 0x201030 - (0x201005 + 1) - 4 = 38
@@ -96,10 +88,10 @@
// 0x201000 - (0x20100f + 1) - 4 = -20
// DISASM2: _start:
-// DISASM2-NEXT: 201000: e9 {{.*}} jmp 43
-// DISASM2-NEXT: 201005: e9 {{.*}} jmp 38
-// DISASM2-NEXT: 20100a: e9 {{.*}} jmp 49
-// DISASM2-NEXT: 20100f: e9 {{.*}} jmp -20
+// DISASM2-NEXT: jmp 43 <bar at plt>
+// DISASM2-NEXT: jmp 38 <bar at plt>
+// DISASM2-NEXT: jmp 49 <zed at plt>
+// DISASM2-NEXT: jmp -20 <_start>
// 0x202018 - 0x201036 = 4066
// 0x202020 - 0x201046 = 4058
@@ -107,20 +99,20 @@
// DISASM2: Disassembly of section .plt:
// DISASM2-EMPTY:
// DISASM2-NEXT: .plt:
-// DISASM2-NEXT: 201020: ff 35 e2 1f 00 00 pushq 8162(%rip)
-// DISASM2-NEXT: 201026: ff 25 e4 1f 00 00 jmpq *8164(%rip)
-// DISASM2-NEXT: 20102c: 0f 1f 40 00 nopl (%rax)
+// DISASM2-NEXT: 201020: pushq 8162(%rip)
+// DISASM2-NEXT: jmpq *8164(%rip)
+// DISASM2-NEXT: nopl (%rax)
// DISASM2-EMPTY:
-// DISASM2-NEXT: bar at plt:
-// DISASM2-NEXT: 201030: ff 25 e2 1f 00 00 jmpq *8162(%rip)
-// DISASM2-NEXT: 201036: 68 00 00 00 00 pushq $0
-// DISASM2-NEXT: 20103b: e9 e0 ff ff ff jmp -32 <.plt>
+// DISASM2-NEXT: bar at plt:
+// DISASM2-NEXT: 201030: jmpq *8162(%rip)
+// DISASM2-NEXT: pushq $0
+// DISASM2-NEXT: jmp -32 <.plt>
// DISASM2-EMPTY:
-// DISASM2-NEXT: zed at plt:
-// DISASM2-NEXT: 201040: ff 25 da 1f 00 00 jmpq *8154(%rip)
-// DISASM2-NEXT: 201046: 68 01 00 00 00 pushq $1
-// DISASM2-NEXT: 20104b: e9 d0 ff ff ff jmp -48 <.plt>
-// DISASM2-NOT: 2010C0
+// DISASM2-NEXT: zed at plt:
+// DISASM2-NEXT: 201040: jmpq *8154(%rip)
+// DISASM2-NEXT: pushq $1
+// DISASM2-NEXT: jmp -48 <.plt>
+// DISASM2-NOT: {{.}}
.global _start
_start:
Modified: lld/trunk/test/ELF/x86-64-tls-gdie.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/x86-64-tls-gdie.s?rev=371588&r1=371587&r2=371588&view=diff
==============================================================================
--- lld/trunk/test/ELF/x86-64-tls-gdie.s (original)
+++ lld/trunk/test/ELF/x86-64-tls-gdie.s Tue Sep 10 23:20:14 2019
@@ -1,30 +1,30 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/tls-opt-gdie.s -o %tso.o
-// RUN: ld.lld -shared %tso.o -o %t.so
-// RUN: ld.lld --hash-style=sysv %t.o %t.so -o %t1
+// RUN: ld.lld -shared %tso.o -soname=so -o %t.so
+// RUN: ld.lld %t.o %t.so -o %t1
// RUN: llvm-readobj -S %t1 | FileCheck --check-prefix=SEC --implicit-check-not=.plt %s
// RUN: llvm-readobj -r %t1 | FileCheck --check-prefix=RELOC %s
-// RUN: llvm-objdump -d %t1 | FileCheck --check-prefix=DISASM %s
+// RUN: llvm-objdump -d --no-show-raw-insn %t1 | FileCheck --check-prefix=DISASM %s
// SEC .got PROGBITS 00000000002020b0 0020b0 000010 00 WA 0 0 8
//RELOC: Relocations [
-//RELOC-NEXT: Section (4) .rela.dyn {
-//RELOC-NEXT: 0x2020B0 R_X86_64_TPOFF64 tlsshared0 0x0
-//RELOC-NEXT: 0x2020B8 R_X86_64_TPOFF64 tlsshared1 0x0
+//RELOC-NEXT: Section (5) .rela.dyn {
+//RELOC-NEXT: 0x2020C0 R_X86_64_TPOFF64 tlsshared0 0x0
+//RELOC-NEXT: 0x2020C8 R_X86_64_TPOFF64 tlsshared1 0x0
//RELOC-NEXT: }
//RELOC-NEXT: ]
-//0x201009 + (4256 + 7) = 0x2020B0
-//0x201019 + (4248 + 7) = 0x2020B8
+// 0x2020C0 - (201009+7) = 4272
+// 0x2020C8 - (201019+7) = 4264
// DISASM: Disassembly of section .text:
// DISASM-EMPTY:
// DISASM-NEXT: _start:
-// DISASM-NEXT: 201000: {{.*}} movq %fs:0, %rax
-// DISASM-NEXT: 201009: {{.*}} addq 4256(%rip), %rax
-// DISASM-NEXT: 201010: {{.*}} movq %fs:0, %rax
-// DISASM-NEXT: 201019: {{.*}} addq 4248(%rip), %rax
+// DISASM-NEXT: movq %fs:0, %rax
+// DISASM-NEXT: 201009: addq 4272(%rip), %rax
+// DISASM-NEXT: movq %fs:0, %rax
+// DISASM-NEXT: 201019: addq 4264(%rip), %rax
.section .text
.globl _start
Modified: lld/trunk/test/ELF/ztext.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/ztext.s?rev=371588&r1=371587&r2=371588&view=diff
==============================================================================
--- lld/trunk/test/ELF/ztext.s (original)
+++ lld/trunk/test/ELF/ztext.s Tue Sep 10 23:20:14 2019
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/ztext.s -o %t2.o
-# RUN: ld.lld %t2.o -o %t2.so -shared
+# RUN: ld.lld %t2.o -o %t2.so -shared -soname=so
# RUN: ld.lld -z notext %t.o %t2.so -o %t -shared
# RUN: llvm-readobj --dynamic-table -r %t | FileCheck %s
More information about the llvm-commits
mailing list