3 # RUN: llvm-mc -filetype=obj -triple=x86_64-mingw32 -o %t.o %s
4 # RUN: lld-link -lldmingw -dll -out:%t.dll %t.o -entry:__ImageBase 2>&1 | FileCheck %s --allow-empty --check-prefix=NOWARNING
5 # RUN: llvm-readobj --coff-exports %t.dll | FileCheck %s
6 # RUN: lld-link -lldmingw -dll -out:%t.dll %t.o -entry:__ImageBase -export:otherfunc 2>&1 | FileCheck %s --check-prefix=WARNING
7 # RUN: llvm-readobj --coff-exports %t.dll | FileCheck %s
9 # Check that the export table contains the manually crafted content
10 # instead of the linker generated exports.
13 # CHECK-NEXT: Ordinal: 1
14 # CHECK-NEXT: Name: myfunc
19 # NOWARNING-NOT: warning
21 # WARNING: warning: literal .edata sections override exports
31 // The object contains
a manually crafted
.edata section, which exports
32 // myfunc
, not otherfunc.
33 .section .edata, "drw"
36 .long 0 // ExportFlags
37 .long 0 // TimeDateStamp
38 .long 0 // MajorVersion + MinorVersion
40 .long 1 // OrdinalBase
41 .long 1 // AddressTableEntries
42 .long 1 // NumberOfNamePointers
43 .rva functions // ExportAddressTableRVA
44 .rva names // NamePointerRVA
45 .rva nameordinals // OrdinalTableRVA