[lld] r249474 - Update tests for upcoming change.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 6 14:52:48 PDT 2015
Author: rafael
Date: Tue Oct 6 16:52:48 2015
New Revision: 249474
URL: http://llvm.org/viewvc/llvm-project?rev=249474&view=rev
Log:
Update tests for upcoming change.
I am about to change lld to avoid creating unnecessary got entries for locally
defined symbols when creating executables.
Update tests that were depending on the current behavior.
Modified:
lld/trunk/test/elf2/plt.s
lld/trunk/test/elf2/relocation-i686.s
lld/trunk/test/elf2/relocation.s
Modified: lld/trunk/test/elf2/plt.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/plt.s?rev=249474&r1=249473&r2=249474&view=diff
==============================================================================
--- lld/trunk/test/elf2/plt.s (original)
+++ lld/trunk/test/elf2/plt.s Tue Oct 6 16:52:48 2015
@@ -1,7 +1,7 @@
// 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: lld -flavor gnu2 -shared %t2.o -o %t2.so
-// RUN: lld -flavor gnu2 %t.o %t2.so -o %t
+// RUN: lld -flavor gnu2 -shared %t.o %t2.so -o %t
// RUN: llvm-readobj -s -r %t | FileCheck %s
// RUN: llvm-objdump -d %t | FileCheck --check-prefix=DISASM %s
// REQUIRES: x86
@@ -12,7 +12,7 @@
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: SHF_EXECINSTR
// CHECK-NEXT: ]
-// CHECK-NEXT: Address: 0x12020
+// CHECK-NEXT: Address: 0x2020
// CHECK-NEXT: Offset:
// CHECK-NEXT: Size: 24
// CHECK-NEXT: Link: 0
@@ -21,9 +21,9 @@
// CHECK: Relocations [
// CHECK-NEXT: Section ({{.*}}) .rela.dyn {
-// CHECK-NEXT: 0x130A0 R_X86_64_GLOB_DAT bar 0x0
-// CHECK-NEXT: 0x130A8 R_X86_64_GLOB_DAT zed 0x0
-// CHECK-NEXT: 0x130B0 R_X86_64_GLOB_DAT _start 0x0
+// CHECK-NEXT: 0x30A0 R_X86_64_GLOB_DAT bar 0x0
+// CHECK-NEXT: 0x30A8 R_X86_64_GLOB_DAT zed 0x0
+// CHECK-NEXT: 0x30B0 R_X86_64_GLOB_DAT _start 0x0
// CHECK-NEXT: }
// CHECK-NEXT: ]
@@ -35,21 +35,21 @@
// 0x12028 - (0x1200a + 1) - 4 = 25
// DISASM: _start:
-// DISASM-NEXT: 12000: e9 {{.*}} jmp 27
-// DISASM-NEXT: 12005: e9 {{.*}} jmp 22
-// DISASM-NEXT: 1200a: e9 {{.*}} jmp 25
+// DISASM-NEXT: 2000: e9 {{.*}} jmp 27
+// DISASM-NEXT: 2005: e9 {{.*}} jmp 22
+// DISASM-NEXT: 200a: e9 {{.*}} jmp 25
// 0x130A0 - 0x12026 = 4218
// 0x130A8 - 0x1202e = 4218
// DISASM: Disassembly of section .plt:
// DISASM-NEXT: .plt:
-// DISASM-NEXT: 12020: ff 25 {{.*}} jmpq *4218(%rip)
-// DISASM-NEXT: 12026: 90 nop
-// DISASM-NEXT: 12027: 90 nop
-// DISASM-NEXT: 12028: ff 25 {{.*}} jmpq *4218(%rip)
-// DISASM-NEXT: 1202e: 90 nop
-// DISASM-NEXT: 1202f: 90 nop
+// DISASM-NEXT: 2020: ff 25 {{.*}} jmpq *4218(%rip)
+// DISASM-NEXT: 2026: 90 nop
+// DISASM-NEXT: 2027: 90 nop
+// DISASM-NEXT: 2028: ff 25 {{.*}} jmpq *4218(%rip)
+// DISASM-NEXT: 202e: 90 nop
+// DISASM-NEXT: 202f: 90 nop
.global _start
_start:
Modified: lld/trunk/test/elf2/relocation-i686.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/relocation-i686.s?rev=249474&r1=249473&r2=249474&view=diff
==============================================================================
--- lld/trunk/test/elf2/relocation-i686.s (original)
+++ lld/trunk/test/elf2/relocation-i686.s Tue Oct 6 16:52:48 2015
@@ -67,7 +67,7 @@ R_386_GOTPC:
.section .R_386_GOT32,"ax", at progbits
.global R_386_GOT32
R_386_GOT32:
- movl R_386_GOT32 at GOT, %eax
+ movl zed at GOT, %eax
// This is the second symbol in the got, so the offset is 4.
// CHECK: Disassembly of section .R_386_GOT32:
// CHECK-NEXT: R_386_GOT32:
Modified: lld/trunk/test/elf2/relocation.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/relocation.s?rev=249474&r1=249473&r2=249474&view=diff
==============================================================================
--- lld/trunk/test/elf2/relocation.s (original)
+++ lld/trunk/test/elf2/relocation.s Tue Oct 6 16:52:48 2015
@@ -91,7 +91,7 @@ R_X86_64_64:
.section .R_X86_64_GOTPCREL,"a", at progbits
.global R_X86_64_GOTPCREL
R_X86_64_GOTPCREL:
- .long R_X86_64_GOTPCREL at gotpcrel
+ .long zed at gotpcrel
// 0x130A8 - 0x11008 = 8352
// 8352 = 0x80200000 in little endian
More information about the llvm-commits
mailing list