Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / COFF / gfids-export.s
blob6c605dfdbd6c973ac9edb6ab4d2ca63684692dfd
1 # REQUIRES: x86
2 # RUN: llvm-mc -triple x86_64-pc-win32 %s -filetype=obj -o %t.obj
3 # RUN: lld-link %t.obj -guard:cf -dll -out:%t.dll -noentry
4 # RUN: llvm-readobj --coff-load-config %t.dll | FileCheck %s --check-prefix=CHECK
6 # There should be a single entry in the table for the exported symbol.
8 # CHECK: GuardFidTable [
9 # CHECK-NEXT: 0x180001000
10 # CHECK-NEXT: ]
12 .def func_export; .scl 2; .type 32; .endef
13 .globl func_export
14 .section .text,"xr",one_only,func_export
15 .p2align 4
16 func_export:
17 movl $1, %eax
18 .globl label_export
19 label_export:
20 movl $2, %eax
21 ret
23 .data
24 .globl data_export
25 data_export:
26 .long 42
28 .section .drectve,"dr"
29 .ascii " /EXPORT:func_export"
30 .ascii " /EXPORT:label_export"
31 .ascii " /EXPORT:data_export"
34 # Load configuration directory entry (winnt.h _IMAGE_LOAD_CONFIG_DIRECTORY64).
35 # The linker will define the __guard_* symbols.
36 .section .rdata,"dr"
37 .globl _load_config_used
38 _load_config_used:
39 .long 256
40 .fill 124, 1, 0
41 .quad __guard_fids_table
42 .quad __guard_fids_count
43 .long __guard_flags
44 .fill 128, 1, 0