summaryrefslogtreecommitdiff
path: root/test/tools/llvm-readobj
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2015-01-03 21:35:09 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2015-01-03 21:35:09 +0000
commitb19a485253ea38cda5dfc45c0e1f6e6a7d1d8b8d (patch)
treedf615207844a41cf904b6c31691fec19d6e431b7 /test/tools/llvm-readobj
parent97f8f69a7fe4d28743c92bdb0daf169558a3e3ba (diff)
llvm-readobj: add support to dump COFF export tables
This enhances llvm-readobj to print out the COFF export table, similar to the -coff-import option. This is useful for testing in lld. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225120 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/tools/llvm-readobj')
-rwxr-xr-xtest/tools/llvm-readobj/Inputs/export-arm.dllbin0 -> 5632 bytes
-rwxr-xr-xtest/tools/llvm-readobj/Inputs/export-x64.dllbin0 -> 6144 bytes
-rwxr-xr-xtest/tools/llvm-readobj/Inputs/export-x86.dllbin0 -> 6144 bytes
-rw-r--r--test/tools/llvm-readobj/coff-exports.test11
4 files changed, 11 insertions, 0 deletions
diff --git a/test/tools/llvm-readobj/Inputs/export-arm.dll b/test/tools/llvm-readobj/Inputs/export-arm.dll
new file mode 100755
index 00000000000..a5555628afc
--- /dev/null
+++ b/test/tools/llvm-readobj/Inputs/export-arm.dll
Binary files differ
diff --git a/test/tools/llvm-readobj/Inputs/export-x64.dll b/test/tools/llvm-readobj/Inputs/export-x64.dll
new file mode 100755
index 00000000000..10b14e8fff9
--- /dev/null
+++ b/test/tools/llvm-readobj/Inputs/export-x64.dll
Binary files differ
diff --git a/test/tools/llvm-readobj/Inputs/export-x86.dll b/test/tools/llvm-readobj/Inputs/export-x86.dll
new file mode 100755
index 00000000000..9efcd3131fe
--- /dev/null
+++ b/test/tools/llvm-readobj/Inputs/export-x86.dll
Binary files differ
diff --git a/test/tools/llvm-readobj/coff-exports.test b/test/tools/llvm-readobj/coff-exports.test
new file mode 100644
index 00000000000..54b42fef84b
--- /dev/null
+++ b/test/tools/llvm-readobj/coff-exports.test
@@ -0,0 +1,11 @@
+RUN: llvm-readobj -coff-exports %p/Inputs/export-x86.dll | FileCheck %s -check-prefix CHECK -check-prefix CHECK-X86
+RUN: llvm-readobj -coff-exports %p/Inputs/export-x64.dll | FileCheck %s -check-prefix CHECK -check-prefix CHECK-X64
+RUN: llvm-readobj -coff-exports %p/Inputs/export-arm.dll | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM
+
+CHECK: Export {
+CHECK: Ordinal: 1
+CHECK: Name: function
+CHECK-X86: RVA: 0x1000
+CHECK-X64: RVA: 0x1000
+CHECK-ARM: RVA: 0x1001
+CHECK: }