95 lines · plain
1Test EXPORTAS in importlibs.2 3RUN: split-file %s %t.dir && cd %t.dir4RUN: llvm-lib -machine:amd64 -def:test.def -out:test.lib5 6RUN: llvm-nm --print-armap test.lib | FileCheck --check-prefix=ARMAP %s7 8ARMAP: Archive map9ARMAP-NEXT: __IMPORT_DESCRIPTOR_test in test.dll10ARMAP-NEXT: __NULL_IMPORT_DESCRIPTOR in test.dll11ARMAP-NEXT: __imp_func in test.dll12ARMAP-NEXT: __imp_func2 in test.dll13ARMAP-NEXT: __imp_func3 in test.dll14ARMAP-NEXT: __imp_mydata in test.dll15ARMAP-NEXT: func in test.dll16ARMAP-NEXT: func2 in test.dll17ARMAP-NEXT: func3 in test.dll18ARMAP-NEXT: test_NULL_THUNK_DATA in test.dll19 20RUN: llvm-readobj test.lib | FileCheck --check-prefix=READOBJ %s21 22READOBJ: File: test.lib(test.dll)23READOBJ-NEXT: Format: COFF-x86-6424READOBJ-NEXT: Arch: x86_6425READOBJ-NEXT: AddressSize: 64bit26READOBJ-EMPTY:27READOBJ-NEXT: File: test.lib(test.dll)28READOBJ-NEXT: Format: COFF-x86-6429READOBJ-NEXT: Arch: x86_6430READOBJ-NEXT: AddressSize: 64bit31READOBJ-EMPTY:32READOBJ-NEXT: File: test.lib(test.dll)33READOBJ-NEXT: Format: COFF-x86-6434READOBJ-NEXT: Arch: x86_6435READOBJ-NEXT: AddressSize: 64bit36READOBJ-EMPTY:37READOBJ-NEXT: File: test.dll38READOBJ-NEXT: Format: COFF-import-file-x86-6439READOBJ-NEXT: Type: code40READOBJ-NEXT: Name type: export as41READOBJ-NEXT: Export name: expfunc42READOBJ-NEXT: Symbol: __imp_func43READOBJ-NEXT: Symbol: func44READOBJ-EMPTY:45READOBJ-NEXT: File: test.dll46READOBJ-NEXT: Format: COFF-import-file-x86-6447READOBJ-NEXT: Type: data48READOBJ-NEXT: Name type: export as49READOBJ-NEXT: Export name: expdata50READOBJ-NEXT: Symbol: __imp_mydata51READOBJ-EMPTY:52READOBJ-NEXT: File: test.dll53READOBJ-NEXT: Format: COFF-import-file-x86-6454READOBJ-NEXT: Type: code55READOBJ-NEXT: Name type: export as56READOBJ-NEXT: Export name: expfunc257READOBJ-NEXT: Symbol: __imp_func258READOBJ-NEXT: Symbol: func259READOBJ-EMPTY:60READOBJ-NEXT: File: test.dll61READOBJ-NEXT: Format: COFF-import-file-x86-6462READOBJ-NEXT: Type: code63READOBJ-NEXT: Name type: export as64READOBJ-NEXT: Export name: expfunc365READOBJ-NEXT: Symbol: __imp_func366READOBJ-NEXT: Symbol: func367 68 69EXPORTAS must be at the end of entry declaration.70RUN: not llvm-lib -machine:amd64 -def:test2.def -out:test2.lib 2>&1 \71RUN: | FileCheck --check-prefix=ERROR %s72RUN: not llvm-lib -machine:amd64 -def:test3.def -out:test3.lib 2>&1 \73RUN: | FileCheck --check-prefix=ERROR %s74ERROR: Invalid data was encountered while parsing the file75 76 77#--- test.def78LIBRARY test.dll79EXPORTS80 func EXPORTAS expfunc81 mydata DATA EXPORTAS expdata82 func2 = myfunc2 EXPORTAS expfunc283 func3 = otherdll.otherfunc3 EXPORTAS expfunc384 85#--- test2.def86LIBRARY test.dll87EXPORTS88 func EXPORTAS expfunc89 mydata EXPORTAS expdata DATA90 91#--- test3.def92LIBRARY test.dll93EXPORTS94 mydata EXPORTAS95