Merging r260587:
[oota-llvm.git] / test / Object / nm-pe-image.test
1 The executable was generated like so:
2 $ cat t.c
3 int main() { return 0; }
4 $ clang --target=i686-windows -c t.c -o t.o
5 $ lld-link t.o -out:t.exe -entry:main -debug
6
7 It has a mingw-style symbol table in the executable, which MSVC-produced images
8 don't have.
9
10 RUN: llvm-nm %p/Inputs/main-ret-zero-pe-i386.exe \
11 RUN:         | FileCheck %s -check-prefix PE-EXE
12
13 PE-EXE: 00401000 t .bss
14 PE-EXE: 00401000 t .data
15 PE-EXE: 00401000 t .text
16 PE-EXE: 00401000 T _main
17
18 The DLL was generated like so:
19 $ cat t.c
20 int DllMain(void *mod, long reason, void *reserved) { return 1; }
21 $ clang --target=i686-windows -c t.c -o t.o
22 $ lld-link t.o -out:t.exe -entry:DllMain -debug -dll
23
24
25 RUN: llvm-nm %p/Inputs/main-ret-zero-pe-i386.dll \
26 RUN:         | FileCheck %s -check-prefix PE-DLL
27
28 PE-DLL: 10001000 t .bss
29 PE-DLL: 10001000 t .data
30 PE-DLL: 10001000 t .text
31 PE-DLL: 10001000 T _DllMain