62 lines · plain
1# REQUIRES: x862 3# RUN: llvm-mc -filetype=obj -triple=x86_64-mingw32 -o %t.o %s4# RUN: lld-link -lldmingw -dll -out:%t.dll %t.o -entry:__ImageBase 2>&1 | FileCheck %s --allow-empty --check-prefix=NOWARNING5# RUN: llvm-readobj --coff-exports %t.dll | FileCheck %s6# RUN: lld-link -lldmingw -dll -out:%t.dll %t.o -entry:__ImageBase -export:otherfunc 2>&1 | FileCheck %s --check-prefix=WARNING7# RUN: llvm-readobj --coff-exports %t.dll | FileCheck %s8 9# Check that the export table contains the manually crafted content10# instead of the linker generated exports.11 12# CHECK: Export {13# CHECK-NEXT: Ordinal: 114# CHECK-NEXT: Name: myfunc15# CHECK-NEXT: RVA:16# CHECK-NEXT: }17# CHECK-EMPTY:18 19# NOWARNING-NOT: warning20 21# WARNING: warning: literal .edata sections override exports22 23 .text24 .globl myfunc25myfunc:26 ret27 .globl otherfunc28otherfunc:29 ret30 31// The object contains a manually crafted .edata section, which exports32// myfunc, not otherfunc.33 .section .edata, "drw"34 .align 435exports:36 .long 0 // ExportFlags37 .long 0 // TimeDateStamp38 .long 0 // MajorVersion + MinorVersion39 .rva name // NameRVA40 .long 1 // OrdinalBase41 .long 1 // AddressTableEntries42 .long 1 // NumberOfNamePointers43 .rva functions // ExportAddressTableRVA44 .rva names // NamePointerRVA45 .rva nameordinals // OrdinalTableRVA46 47names:48 .rva funcname_myfunc49 50nameordinals:51 .short 052 53functions:54 .rva myfunc55 .long 056 57funcname_myfunc:58 .asciz "myfunc"59 60name:61 .asciz "mydll.dll"62