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

            Bug ID: 44520
           Summary: lld's COFF driver ignores ordinal, PRIVATE, NONAME in
                    .def for forwards
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: COFF
          Assignee: unassignedb...@nondot.org
          Reporter: cfswo...@gmail.com
                CC: llvm-bugs@lists.llvm.org

This one seems like an easy enough fix; the for loop in
COFF/Driver.cpp:parseModuleDefs just needs to set e2.{ordinal,noname,isPrivate}
in the forwarding case.

Steps to repro:

$ touch example.c
$ cl /nologo /c example.c
$ cat example.def
EXPORTS
  Sleep=kernel32.Sleep @123 NONAME PRIVATE

$ link /nologo /subsystem:windows /dll /out:example.dll /implib:example.lib
example.obj /def:example.def
$ dumpbin /exports example.dll
<...>
    ordinal hint RVA      name

        123               [NONAME] (forwarded to kernel32.Sleep)
<...>
$ dumpbin /exports example.lib
<...no exports...>

$ lld-link /nologo /subsystem:windows /dll /out:example.dll /implib:example.lib
example.obj /def:example.def
$ dumpbin /exports example.dll
<...>
    ordinal hint RVA      name

          1    0          Sleep (forwarded to kernel32.Sleep)
<...>
$ dumpbin /exports example.lib
<...>
       ordinal    name

                  Sleep
<...>

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

Reply via email to