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

            Bug ID: 42407
           Summary: MinGW: Undefined reference message is missing source
                    file and line
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Windows XP
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: COFF
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

When compiling with debugging symbols, GNU ld reports the file and line of the
reference. lld is missing this feature on MinGW. It works correctly on Linux.

$ cat test.cpp
void func();

int main(int argc, char **argv)
{
    func();
    return 0;
}

$ g++ -g test.cpp
C:\Users\orgads\AppData\Local\Temp\cci25Lpz.o: In function `main':
F:\Temp/test.cpp:5: undefined reference to `func()'
collect2.exe: error: ld returned 1 exit status

$ g++ -g -fuse-ld=lld test.cpp
lld-link: error: undefined symbol: __Z4funcv
>>> referenced by C:\Users\orgads\AppData\Local\Temp\cccApKoz.o:(.text)
collect2.exe: error: ld returned 1 exit status

On linux:
$ g++ -g -fuse-ld=lld test.cpp
ld.lld: error: undefined symbol: func()
>>> referenced by test.cpp:5
>>>               /tmp/ccg8pzRr.o:(main)
collect2: error: ld returned 1 exit status

-- 
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