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

            Bug ID: 45111
           Summary: lld creates `.00cfg` and `.voltbl` sections, link.exe
                    doesn't
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: COFF
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

The issue is easy to reproduce using the latest clang from
https://llvm.org/builds/ (Git commit 2663a25f, 3 February 2020).

1. Create test.cpp with these contents:

#include <stdio.h>
int wmain(int argc, wchar_t* argv[])
{
        printf("Hello, world!");
        return 0;
}

2. Compile it and link using lld:
clang -std=c++17 -m32 -fuse-ld=lld -Oz
-Wl,-subsystem:console,-merge:.rdata=.text,-out:test1.exe test.cpp

3. Compile it and link using default link.exe:
clang -std=c++17 -m32 -Oz
-Wl,-subsystem:console,-merge:.rdata=.text,-out:test2.exe test.cpp

4. Compare section lists of the `test1.exe` and `test2.exe`. The `test1.exe`
(linked by lld) does have `.00cfg` and `.voltbl` sections; the `test2.exe`
(linked by default linker, link.exe I suppose) doesn't have these sections.

Repro files (with all the libraries) are here:
http://veg.by/files/temp/lld_00cfg_repro.7z

It seems that these sections come from standard VC++ and Windows SDK libraries.
I guess that it is expected that lld should behave like link.exe. So, probably
it is worth to investigate what causes this difference.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to