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

Created attachment 19905
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

Reply via email to