https://bugs.llvm.org/show_bug.cgi?id=36440

            Bug ID: 36440
           Summary: Bad PE when linking with .dlls instead of .libs
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: COFF
          Assignee: unassignedb...@nondot.org
          Reporter: alexandre.ga...@ubisoft.com
                CC: llvm-bugs@lists.llvm.org

Created attachment 19905
  --> https://bugs.llvm.org/attachment.cgi?id=19905&action=edit
left is link.exe dump (correct); right is lld-link.exe dump (incorrect).

While linking a fairly large project (300Mb .exe), the PE's
IMAGE_EXPORT_DIRECTORY doesn't seem correct. The RVA values seem to be out of
the current section's range. They actually point on data that isn't expected
for those fields.

Please see enclosed image, left is link.exe dump (correct); right is
lld-link.exe dump (incorrect).

The .objs are compiled with cl.exe, not clang-cl.exe. The libraries are created
using llvm-lib.exe. The same command-line is used for link.exe and lld-link.exe
(except for missing /WX because /IGNORE isn't supported in LLD):

When launching the executable, it terminates with code 0xc000007b.
The Visual Studio debug output says: "SXS: BasepCreateActCtx()
BasepSxsCreateStreams() failed"

This was caused by a mistake in our buildsystem, where two .dlls where linking
in, instead of using the .libs

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to