diff options
author | Martin Storsjo <martin@martin.st> | 2017-07-31 11:18:41 +0000 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2017-07-31 11:18:41 +0000 |
commit | 4a5764e3caf49e1b290a0a0e7b588e2109f4f292 (patch) | |
tree | 2a636d20db93fbbde5b7fe2f42ef6bb9d27bd7fe /llvm/test | |
parent | 15cf379519ae473c4446ac8efb7f7bb995c5a5f3 (diff) | |
download | bcm5719-llvm-4a5764e3caf49e1b290a0a0e7b588e2109f4f292.tar.gz bcm5719-llvm-4a5764e3caf49e1b290a0a0e7b588e2109f4f292.zip |
[llvm-dlltool] Write correct weak externals
Previously, the created object files for the import library were broken.
Write the symbol table before the string table. Simplify the code by
using a separate variable Prefix instead of duplicating a few lines.
Also update the coff-weak-exports to actually check that the generated
weak symbols can be found as intended.
Differential Revision: https://reviews.llvm.org/D36065
llvm-svn: 309555
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/DllTool/coff-weak-exports.def | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/llvm/test/DllTool/coff-weak-exports.def b/llvm/test/DllTool/coff-weak-exports.def index 511d947d839..b4709e97264 100644 --- a/llvm/test/DllTool/coff-weak-exports.def +++ b/llvm/test/DllTool/coff-weak-exports.def @@ -1,19 +1,11 @@ ; RUN: llvm-dlltool -m i386:x86-64 --input-def %s --output-lib %t.a -; RUN: llvm-readobj -coff-exports %t.a | FileCheck %s +; RUN: llvm-nm %t.a | FileCheck %s LIBRARY test.dll EXPORTS TestFunction==AltTestFunction -; CHECK: File: test.dll -; CHECK: Format: COFF-x86-64 -; CHECK: Arch: x86_64 -; CHECK: AddressSize: 64bit -; CHECK: File: test.dll -; CHECK: Format: COFF-x86-64 -; CHECK: Arch: x86_64 -; CHECK: AddressSize: 64bit -; CHECK: File: test.dll -; CHECK: Format: COFF-x86-64 -; CHECK: Arch: x86_64 -; CHECK: AddressSize: 64bit +; CHECK: U AltTestFunction +; CHECK-NEXT: w TestFunction +; CHECK: U __imp_AltTestFunction +; CHECK-NEXT: w __imp_TestFunction |