Files
clang-p2996/lld/test/COFF/lib.test
Ayke van Laethem d649faff9c [LLD][COFF] Support GNU style == aliases
D46245 added support for this in llvm-libtool, but while lld-link can
also create .lib files from .def files it didn't support aliases.

I compared the Inputs/library.def test against the output from
llvm-libtool and it matches, except for the fact that lld-link reorders
functions for some reason.

I have also verified that this fixes a bug I was running into while
trying to compile .def files to .lib files in MinGW-w64 (using lld-link
instead of llvm-libtool).

Differential Revision: https://reviews.llvm.org/D113365
2022-01-19 14:22:13 +01:00

22 lines
482 B
Plaintext

# RUN: lld-link /machine:x64 /def:%S/Inputs/library.def /out:%t.lib
# RUN: llvm-nm %t.lib | FileCheck %s
CHECK: 00000000 a @comp.id
CHECK: 00000000 a @feat.00
CHECK: 00000000 W alias
CHECK: U function
CHECK: 00000000 a @comp.id
CHECK: 00000000 a @feat.00
CHECK: 00000000 W __imp_alias
CHECK: U __imp_function
CHECK: 00000000 R __imp_constant
CHECK: 00000000 R constant
CHECK: 00000000 D __imp_data
CHECK: 00000000 T __imp_function
CHECK: 00000000 T function