[llvm-bugs] [Bug 47384] New: -wrap not supported on MinGW

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 1 07:02:51 PDT 2020


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

            Bug ID: 47384
           Summary: -wrap not supported on MinGW
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Windows XP
            Status: NEW
          Severity: normal
          Priority: P
         Component: COFF
          Assignee: unassignedbugs at nondot.org
          Reporter: orgads at gmail.com
                CC: llvm-bugs at lists.llvm.org

rand.cpp:
#include <stdlib.h>
#include <stdio.h>

extern "C" int __wrap_rand() { return 42; }

int main()
{
    printf("%d\n", rand());
    return 0;
}

$ g++ -Wl,-wrap=rand -o rand rand.cpp

$ ./rand
42

$ g++ -fuse-ld=lld -Wl,-wrap=rand -o rand rand.cpp
lld: error: unknown argument: -wrap=rand
collect2.exe: error: ld returned 1 exit status

-- 
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/20200901/fbe1787d/attachment.html>


More information about the llvm-bugs mailing list