[llvm-bugs] [Bug 45111] New: lld creates `.00cfg` and `.voltbl` sections, link.exe doesn't

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 5 03:11:04 PST 2020


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: unassignedbugs at nondot.org
          Reporter: me at veg.by
                CC: llvm-bugs at lists.llvm.org

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200305/37b1922a/attachment.html>


More information about the llvm-bugs mailing list