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

            Bug ID: 21090
           Summary: bad relocation (unknown type) linking Mach-O on OS X
                    to crt1.o
           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

Linking a dummy object file with only 1 symbol, _main, using the command:

  `lld -flavor darwin /usr/lib/crt1.o /usr/lib/libSystem.B.dylib test.o`

produces the following error:

  `Cannot open /usr/lib/crt1.o: bad relocation (unknown type) in section
__TEXT/__text (r_address=0, r_type=0, r_extern=0, r_length=0, r_pcrel=0,
r_symbolnum=0)`

crt1.o is a fat Mach-O binary:

```
$ file /usr/lib/crt1.o
/usr/lib/crt1.o: Mach-O universal binary with 2 architectures
/usr/lib/crt1.o (for architecture x86_64):    Mach-O 64-bit object x86_64
/usr/lib/crt1.o (for architecture i386):    Mach-O object i386
```

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