Rename CODE_OWNERS -> Maintainers (#114544)
[llvm-project.git] / lld / test / COFF / associative-comdat-mingw-i386.s
blob3ba8c1cd9a75b9ac1a7a37913baf523002dd355a
1 # REQUIRES: x86
3 # RUN: llvm-mc -triple=i686-windows-gnu %s -defsym stdcall=0 -filetype=obj -o %t.obj
5 # RUN: lld-link -lldmingw -entry:main %t.obj -out:%t.exe
6 # RUN: llvm-objdump -s %t.exe | FileCheck %s
8 # RUN: llvm-mc -triple=i686-windows-gnu %s -defsym stdcall=1 -filetype=obj -o %t.stdcall.obj
9 # RUN: lld-link -lldmingw -entry:main %t.stdcall.obj -out:%t.stdcall.exe
10 # RUN: llvm-objdump -s %t.stdcall.exe | FileCheck %s
12 # Check that the .eh_frame comdat was included, even if it had no symbols,
13 # due to associativity with the symbol _foo.
15 # CHECK: Contents of section .eh_fram:
16 # CHECK: 403000 42
18 .text
19 .def _main;
20 .scl 2;
21 .type 32;
22 .endef
23 .globl _main
24 .p2align 4, 0x90
25 _main:
26 .if stdcall==0
27 call _foo
28 .else
29 call _foo@0
30 .endif
31 ret
33 .section .eh_frame$foo,"dr"
34 .linkonce discard
35 .byte 0x42
37 .if stdcall==0
38 .def _foo;
39 .else
40 .def _foo@0;
41 .endif
42 .scl 2;
43 .type 32;
44 .endef
45 .if stdcall==0
46 .section .text$foo,"xr",discard,_foo
47 .globl _foo
48 .p2align 4
49 _foo:
50 .else
51 .section .text$foo,"xr",discard,_foo@0
52 .globl _foo@0
53 .p2align 4
54 _foo@0:
55 .endif
56 ret