[llvm-dev] lld-link with MSVC6 object files

Martin Storsjö via llvm-dev llvm-dev at lists.llvm.org
Tue Oct 1 23:23:33 PDT 2019


On Sat, 28 Sep 2019, Paul Moran via llvm-dev wrote:

> Hi,
> 
> I have a question about lld-link. What obj file formats should it support?
> When I try to use an obj from msvc 6.0 it complains that the file magic is
> not valid.

I just tested building an object file with MSVC 6.0 and linking it with 
lld, and it mostly works fine.

At first I got errors like these though:

lld-link: error: /safeseh: hello.obj is not compatible with SEH

But by adding -safeseh:no, I was able to link the file just fine.

If the MSVC 6.0 built object file was built with debug info, I get lld 
warnings like these:

lld-link: warning: ignoring section .debug$S with unrecognized magic 0x2
lld-link: warning: ignoring section .debug$T with unrecognized magic 0x2

Is this what you got? Despite these, linking works (but you won't get a 
working debug info).

// Martin



More information about the llvm-dev mailing list