aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/COFF/pdb.test7
-rw-r--r--test/ELF/arm-thumb-interwork-shared.s44
-rw-r--r--test/ELF/basic-mips.s2
-rw-r--r--test/ELF/basic-ppc.s2
-rw-r--r--test/ELF/string-table.s40
5 files changed, 53 insertions, 42 deletions
diff --git a/test/COFF/pdb.test b/test/COFF/pdb.test
index af174b7a2038..b20a58938920 100644
--- a/test/COFF/pdb.test
+++ b/test/COFF/pdb.test
@@ -28,8 +28,13 @@
# CHECK-NEXT: - Stream: [ 8 ]
# CHECK-NEXT: - Stream: [ 4 ]
# CHECK-NEXT: PdbStream:
+# Ensure that the Guid matches the RSDS record:
+# PDBSignature: 0x53445352
+# PDBGUID (38 9A CC F2 14 A4 7F A2 6C F0 08 04 47 CF 5C 48)
+# PDBAge: 1
# CHECK-NEXT: Age: 1
-# CHECK-NEXT: Guid: '{00000000-0000-0000-0000-000000000000}'
+# Guid: '{389ACCF2-14A4-7FA2-6CF0-080447CF5C48}'
+# CHECK-NEXT: Guid: '{{.*}}'
# CHECK-NEXT: Signature: 0
# CHECK-NEXT: Version: VC70
# CHECK-NEXT: NamedStreams:
diff --git a/test/ELF/arm-thumb-interwork-shared.s b/test/ELF/arm-thumb-interwork-shared.s
new file mode 100644
index 000000000000..ffd055e5b621
--- /dev/null
+++ b/test/ELF/arm-thumb-interwork-shared.s
@@ -0,0 +1,44 @@
+// RUN: llvm-mc -filetype=obj -triple=thumbv7a-none-linux-gnueabi %s -o %t
+// RUN: ld.lld %t --shared -o %t.so
+// RUN: llvm-objdump -d -triple=thumbv7a-none-linux-gnueabi %t.so | FileCheck %s
+// RUN: llvm-objdump -d -triple=armv7a-none-linux-gnueabi %t.so | FileCheck %s -check-prefix=PLT
+// REQUIRES: arm
+ .syntax unified
+ .global sym1
+ .global elsewhere
+ .weak weakref
+sym1:
+ b.w elsewhere
+ b.w weakref
+
+// Check that we generate a thunk for an undefined symbol called via a plt
+// entry.
+
+// CHECK: Disassembly of section .text:
+// CHECK-NEXT: sym1:
+// CHECK: 1000: 00 f0 02 b8 b.w #4
+// CHECK-NEXT: 1004: 00 f0 06 b8 b.w #12
+// CHECK-NEXT: 1008: 40 f2 20 0c movw r12, #32
+// CHECK-NEXT: 100c: c0 f2 00 0c movt r12, #0
+// CHECK-NEXT: 1010: fc 44 add r12, pc
+// CHECK-NEXT: 1012: 60 47 bx r12
+// CHECK-NEXT: 1014: 40 f2 24 0c movw r12, #36
+// CHECK-NEXT: 1018: c0 f2 00 0c movt r12, #0
+// CHECK-NEXT: 101c: fc 44 add r12, pc
+// CHECK-NEXT: 101e: 60 47 bx r12
+
+// PLT: Disassembly of section .plt:
+// PLT-NEXT: .plt:
+// PLT: 1020: 04 e0 2d e5 str lr, [sp, #-4]!
+// PLT-NEXT: 1024: 04 e0 9f e5 ldr lr, [pc, #4]
+// PLT-NEXT: 1028: 0e e0 8f e0 add lr, pc, lr
+// PLT-NEXT: 102c: 08 f0 be e5 ldr pc, [lr, #8]!
+// PLT-NEXT: 1030: d0 1f 00 00
+// PLT-NEXT: 1034: 04 c0 9f e5 ldr r12, [pc, #4]
+// PLT-NEXT: 1038: 0f c0 8c e0 add r12, r12, pc
+// PLT-NEXT: 103c: 00 f0 9c e5 ldr pc, [r12]
+// PLT-NEXT: 1040: cc 1f 00 00
+// PLT-NEXT: 1044: 04 c0 9f e5 ldr r12, [pc, #4]
+// PLT-NEXT: 1048: 0f c0 8c e0 add r12, r12, pc
+// PLT-NEXT: 104c: 00 f0 9c e5 ldr pc, [r12]
+// PLT-NEXT: 1050: c0 1f 00 00
diff --git a/test/ELF/basic-mips.s b/test/ELF/basic-mips.s
index dc640edae9f0..84a7663675fc 100644
--- a/test/ELF/basic-mips.s
+++ b/test/ELF/basic-mips.s
@@ -297,7 +297,7 @@ __start:
# CHECK-NEXT: VirtualAddress: 0x30000
# CHECK-NEXT: PhysicalAddress: 0x30000
# CHECK-NEXT: FileSize: 8
-# CHECK-NEXT: MemSize: 8
+# CHECK-NEXT: MemSize: 65536
# CHECK-NEXT: Flags [ (0x4)
# CHECK-NEXT: PF_R (0x4)
# CHECK-NEXT: ]
diff --git a/test/ELF/basic-ppc.s b/test/ELF/basic-ppc.s
index c0f28bd48c41..e08c7a32eb7c 100644
--- a/test/ELF/basic-ppc.s
+++ b/test/ELF/basic-ppc.s
@@ -295,7 +295,7 @@
// CHECK-NEXT: VirtualAddress: 0x2000
// CHECK-NEXT: PhysicalAddress: 0x2000
// CHECK-NEXT: FileSize: 48
-// CHECK-NEXT: MemSize: 48
+// CHECK-NEXT: MemSize: 4096
// CHECK-NEXT: Flags [ (0x4)
// CHECK-NEXT: PF_R (0x4)
// CHECK-NEXT: ]
diff --git a/test/ELF/string-table.s b/test/ELF/string-table.s
index c783445f8e31..92b8345976d8 100644
--- a/test/ELF/string-table.s
+++ b/test/ELF/string-table.s
@@ -1,6 +1,6 @@
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
// RUN: ld.lld %t -o %t2
-// RUN: llvm-readobj -sections -section-data %t2 | FileCheck %s
+// RUN: llvm-readobj -sections %t2 | FileCheck %s
// REQUIRES: x86
.global _start
@@ -41,41 +41,3 @@ _start:
// CHECK-NEXT: Address: 0x0
// CHECK-NOT: Name: foobar
-
-// Test that the string "bar" is merged into "foobar".
-
-// CHECK: Section {
-// CHECK: Index:
-// CHECK: Name: .shstrtab
-// CHECK-NEXT: Type: SHT_STRTAB
-// CHECK-NEXT: Flags [
-// CHECK-NEXT: ]
-// CHECK-NEXT: Address: 0x0
-// CHECK-NEXT: Offset:
-// CHECK-NEXT: Size:
-// CHECK-NEXT: Link: 0
-// CHECK-NEXT: Info: 0
-// CHECK-NEXT: AddressAlignment: 1
-// CHECK-NEXT: EntrySize: 0
-// CHECK-NEXT: SectionData (
-// CHECK-NEXT: 0000: 00626172 002E7465 78740066 6F6F6261 |.bar..text.fooba|
-// CHECK-NEXT: 0010: 72002E63 6F6D6D65 6E74002E 73796D74 |r..comment..symt|
-// CHECK-NEXT: 0020: 6162002E 73687374 72746162 002E7374 |ab..shstrtab..st|
-// CHECK-NEXT: 0030: 72746162 00 |rtab.|
-// CHECK-NEXT: )
-// CHECK-NEXT:}
-// CHECK: Name: .strtab
-// CHECK-NEXT: Type: SHT_STRTAB (0x3)
-// CHECK-NEXT: Flags [ (0x0)
-// CHECK-NEXT: ]
-// CHECK-NEXT: Address: 0x0
-// CHECK-NEXT: Offset:
-// CHECK-NEXT: Size: 15
-// CHECK-NEXT: Link: 0
-// CHECK-NEXT: Info: 0
-// CHECK-NEXT: AddressAlignment: 1
-// CHECK-NEXT: EntrySize: 0
-// CHECK-NEXT: SectionData (
-// CHECK-NEXT: 0000: 00666F6F 62617200 5F737461 727400 |.foobar._start.|
-// CHECK-NEXT: )
-// CHECK-NEXT: }