Skip to content

Instantly share code, notes, and snippets.

// RUN: rm -rf %t && split-file %s %t
// RUN: llvm-mc -filetype=obj -triple=x86_64-w64-mingw32 %t/lib.s -o %t/lib.o
// RUN: ld.bfd -m i386pep %t/lib.o --dll -o %t/lib.dll --out-implib %t/lib.dll.a @%t/wrap.rsp --entry _dllmain --export-all-symbols
// RUN: llvm-mc -filetype=obj -triple=x86_64-w64-mingw32 %t/main.s -o %t/main.o
// RUN: llvm-mc -filetype=obj -triple=x86_64-w64-mingw32 %t/table.s -o %t/table.o
// RUN: llvm-mc -filetype=obj -triple=x86_64-w64-mingw32 %t/override.s -o %t/override.o
// RUN: ld.bfd -m i386pep %t/main.o %t/table.o %t/override.o %t/lib.dll.a -o %t/bfd_imp.exe @%t/wrap.rsp
// RUN: llvm-readobj --coff-imports --coff-basereloc %t/bfd_imp.exe | FileCheck %s
// RUN: %t/bfd_imp.exe
// RUN: ld.bfd -m i386pep %t/main.o %t/table.o %t/override.o %t/lib.dll -o %t/bfd_dll.exe @%t/wrap.rsp