llvm-project
34 строки · 1.1 Кб
1# REQUIRES: x86
2
3# RUN: llvm-mc -triple=x86_64-windows-gnu %p/Inputs/gnu-implib-head.s -filetype=obj -o %t-dabcdh.o
4# RUN: llvm-mc -triple=x86_64-windows-gnu %p/Inputs/gnu-implib-data.s -filetype=obj -o %t-dabcds00000.o
5# RUN: llvm-mc -triple=x86_64-windows-gnu %p/Inputs/gnu-implib-tail.s -filetype=obj -o %t-dabcdt.o
6# RUN: rm -f %t-implib.a
7# RUN: llvm-ar rcs %t-implib.a %t-dabcdh.o %t-dabcds00000.o %t-dabcdt.o
8
9# RUN: llvm-mc -triple=x86_64-windows-gnu %s -filetype=obj -o %t.obj
10# RUN: lld-link -lldmingw -debug:symtab -out:%t.exe -entry:main %t.obj %t-implib.a -verbose
11
12# RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORTS %s
13# RUN: llvm-nm %t.exe | FileCheck -check-prefix=SYMBOLS %s
14
15# IMPORTS: Import {
16# IMPORTS-NEXT: Name: foo.dll
17# IMPORTS-NEXT: ImportLookupTableRVA:
18# IMPORTS-NEXT: ImportAddressTableRVA:
19# IMPORTS-NEXT: Symbol: data (0)
20# IMPORTS-NEXT: }
21
22# Check that the automatically imported symbol "data" is not listed in
23# the symbol table.
24# SYMBOLS-NOT: {{ }}data
25
26.global main
27.text
28main:
29movl data(%rip), %eax
30ret
31.global _pei386_runtime_relocator
32_pei386_runtime_relocator:
33ret
34.data
35