http://llvm.org/bugs/show_bug.cgi?id=20539

            Bug ID: 20539
           Summary: lld crashes when linking x86_64 Mach-O file
           Product: lld
           Version: unspecified
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: All Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Created attachment 12857
  --> http://llvm.org/bugs/attachment.cgi?id=12857&action=edit
test.c, a harmless C file

For some `test.o`, compiled with `clang -c test.c`, running the command,

  `lld -flavor darwin test.o`

fails with the following build output:

```
Unknown arch
UNREACHABLE executed at ArchHandler.cpp:46!
0  libLLVM-3.6svn.dylib     0x000000010ececf37
llvm::sys::PrintStackTrace(__sFILE*) + 40
1  libLLVM-3.6svn.dylib     0x000000010eced322 SignalHandler(int) + 248
2  libsystem_platform.dylib 0x00007fff975c95aa _sigtramp + 26
3  libsystem_platform.dylib 0x00007f9cfac00000 _sigtramp + 1667459696
4  libLLVM-3.6svn.dylib     0x000000010eced189 abort + 22
5  libLLVM-3.6svn.dylib     0x000000010ecdb673 LLVMInstallFatalErrorHandler + 0
6  lld                      0x000000010e064149
7  lld                      0x000000010e06a928
8  lld                      0x000000010e06cccb
9  lld                      0x000000010e04cca4
10 lld                      0x000000010e055315
11 lld                      0x000000010e04bbc0
12 libdyld.dylib            0x00007fff96afc5fd start + 1
13 libdyld.dylib            0x0000000000000004 start + 1766865416
Stack dump:
0.    Program arguments: /usr/local/opt/llvm/bin/lld -flavor darwin test.o 
Illegal instruction: 4
```

Only the flags `-flavor darwin` could be passed, because LLD did not recognize
the `-target` flag when it was passed, nor did it work without the `-flavor`
flag.

This is using the lld HEAD, llvm HEAD, and clang HEAD, 2014-07-05, (llvm
3.6.0pre). However I saw this same error at least a month ago.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to